<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.0">
  <channel>
    <title>
Altova Mailing List: xmlschema-dev
    </title>
    <link>http://www.altova.com/</link>
    <description>Altova accelerates application development and data management projects with software and solutions that enhance productivity and maximize results. As an innovative, customer-focused company and the creator of XMLSpy and other leading XML, data administration, UML, and Web services tools, Altova is the choice of over 3 million clients worldwide, including virtually every Fortune 500 company. With customers ranging from vast development teams in the worldâ€™s largest organizations to progressive one-person shops, Altovaâ€™s line of software applications fulfills a broad spectrum of business needs. Altova is an active member of the World Wide Web Consortium (W3C) and Object Management Group (OMG) and is committed to delivering standards-based platform-independent solutions that are powerful, affordable, and easy to use. Altova was founded in 1992 and has headquarters in Beverly, Massachusetts and Vienna, Austria.</description>
    <language>en-us</language>
    <copyright>Copyright Â© 2005, 2006, 2007 Altova GmbH. All rights reserved. Altova, XMLSpy, MapForce, StyleVision, SemanticWorks, SchemaAgent, UModel, DiffDog, and Authentic are trademarks and/or registered trademarks of Altova GmbH in the United States and/or other countries. The names of and reference to other companies and products mentioned herein may be the trademarks of their respective owners.</copyright>
    <pubDate>Tue, 03 Jun 2008 10:00:00 EDT</pubDate>
    <lastBuildDate>Tue, 03 Jun 2008 10:00:00 EDT</lastBuildDate>
    <generator>Authentic RSS Editor, visit www.altova.com for details</generator>
    <managingEditor>pr@altova.com</managingEditor>
    <webMaster>webmaster@altova.com</webMaster>
    <image>
      <url>http://www.altova.com/images/logos/altova_right_120.gif</url>
      <title>ALTOVA</title>
      <link>http://www.altova.com/</link>
      <width>120</width>
      <height>24</height>
      <description>Altova Logo</description>
    </image>

<item>
<title>Re: Time wihtout Seconds - 10/13/2008 7:13:00 PM</title>
<description><![CDATA[<pre>Please try this,

&lt;xs:element name=&quot;time&quot; type=&quot;timeType&quot; /&gt;

 &lt;xs:simpleType name=&quot;timeType&quot;&gt;
   &lt;xs:restriction base=&quot;xs:string&quot;&gt;
     &lt;xs:pattern value=&quot;[0-9][0-9]:[0-5][0-9]&quot; /&gt;
   &lt;/xs:restriction&gt;
 &lt;/xs:simpleType&gt;

On Sun, Oct 12, 2008 at 4:12 AM, Rowan Sylvester-Bradley
&lt;rowan@sylvester-bradley.org&gt; wrote:
&gt; How do I write a schema that will validate an element containing a time in
&gt; the format hh:mm (without any seconds)? I'm trying to write a schema for an
&gt; existing XML file that's generated by a piece of software which I have no
&gt; access to, so I can't just add the seconds...
&gt;
&gt; Thanks - Rowan



-- 
Regards,
Mukul Gandhi

From petexmldev@codalogic.com Mon Oct 13 08:31:03 2008
Received: from maggie.w3</pre>]]></description>
<link>http://www.altova.com/list/xmlschema-dev/200810/msg1000287035.html</link>
</item><item>
<title>Re: Time without Seconds - 10/13/2008 1:49:00 PM</title>
<description><![CDATA[<pre>Pete,

Many thanks, that works fine. I ended up with the following, which accepts 
times with or without seconds:

&lt;xsd:simpleType name=&quot;time_hh_mm&quot;&gt;
  &lt;xsd:restriction base=&quot;xsd:string&quot;&gt;
    &lt;xsd:pattern value=&quot;[0-1][0-9]:[0-5][0-9]&quot;/&gt;
    &lt;xsd:pattern value=&quot;[0-1][0-9]:[0-5][0-9]:[0-5][0-9]&quot;/&gt;
    &lt;xsd:pattern value=&quot;2[0-3]:[0-5][0-9]&quot;/&gt;
    &lt;xsd:pattern value=&quot;2[0-3]:[0-5][0-9]:[0-5][0-9]&quot;/&gt;
  &lt;/xsd:restriction&gt;
&lt;/xsd:simpleType&gt;

Rowan

----- Original Message ----- 
From: &quot;Pete Cordell&quot; &lt;petexmldev@codalogic.com&gt;
To: &quot;Rowan Sylvester-Bradley&quot; &lt;rowan@sylvester-bradley.org&gt;; 
&lt;xmlschema-dev@w3.org&gt;
Sent: Monday, October 13, 2008 9:30 AM
Subject: Re: Time wihtout Seconds


&gt;
&gt; ----- Original Message From: &quot;Rowan Sylvester-Bradley&quot;
&gt;
&gt;&gt; How do I write a schema that will validate an element containing a
&gt;&gt; time in the format hh:mm (without any seconds)? I'm trying to write
&gt;&gt; a schema for an existing XML file that's generated by a piece of
&gt;&gt; software which I have no access to, so I can't just add the seconds...
&gt;
&gt; In that case you probably want to have a base type of an xs:string and 
&gt; then restrict it using an xs:pattern facet.  Something like:
&gt;
&gt; &lt;xs:simpleType name=&quot;myTime&quot;&gt;
&gt; &lt;xs:restriction base=&quot;xs:string&quot;&gt;
&gt;  &lt;xs:pattern value=&quot;[0-2][0-9]:[0-5][0-9]&quot;/&gt;
&gt; &lt;/xs:restriction&gt;
&gt; &lt;/xs:simpleType&gt;
&gt;
&gt; Or possibly even better:
&gt;
&gt; &lt;xs:simpleType name=&quot;myTime&quot;&gt;
&gt; &lt;xs:restriction base=&quot;xs:string&quot;&gt;
&gt;  &lt;xs:pattern value=&quot;[0-1][0-9]:[0-5][0-9]&quot;/&gt;
&gt;  &lt;xs:pattern value=&quot;2[0-3]:[0-5][0-9]&quot;/&gt;
&gt; &lt;/xs:restriction&gt;
&gt; &lt;/xs:simpleType&gt;
&gt;
&gt; (I'm pretty sure the pattern facets have an OR type relationship rather 
&gt; than an AND type relationship.  I'm sure someone will correct me if I'm 
&gt; wrong.)
&gt;
&gt; HTH,
&gt;
&gt; Pete Cordell
&gt; Codalogic Ltd
&gt; Interface XML to C++ the easy way using XML C++
&gt; data binding to convert XSD schemas to C++ classes.
&gt; Visit http://www.codalogic.com/lmx/ for more info


From noah_mendelsohn@us.ibm.com Mon Oct 13 20:28:15 2008
Received: from maggie.w3.org ([193.51.208.68])
	by fr</pre>]]></description>
<link>http://www.altova.com/list/xmlschema-dev/200810/msg1000287037.html</link>
</item><item>
<title>RE: empty xs:extension of a simple type - 10/13/2008 12:27:00 PM</title>
<description><![CDATA[<pre>Michael Kay writes:

&gt; It does raise the question of why simple types are something 
&gt; radically different from complex types, rather than simply a 
&gt; special case of a complex type that happens to define no 
&gt; children and no attributes.

For what it's worth, this was debated at great length during the design of 
Schema 1.0.  Perhaps others will recollect differently, but I don't recall 
the analysis leading to a simple clear winner in the design space.  Not 
sure I could reproduce the pros and cons these many years later, but I 
think it was along the following lines:  we could have made no distinction 
in general between complex and simple types.  We then would have been in 
the position of saying that a type that just happened to have no 
attributes and happened to have stringlike content was special, and in 
particular could be used as the type of an attribute.  The alternative was 
to do what we did, which was to make a separately named abstraction for 
what we now know as simple and complex types.  For the most part, they are 
naturally disjoint, but the messy case is the one in question here, I.e. 
that the degenerate case of a complex type (I.e. no attributes and no 
element content) is mighty close to a simple type in what it does.  So, we 
could have tried to collapse just that case.  Take a complex type with 
simple content and an optional attribute, and now restrict away the 
attribute.  Should it magically turn into a simple type?  Hmm.  Seems a 
bit magical.  Anyway, I doubt I'm getting all the details right, but as I 
recall the discussion felt somewhat like that.  As I say, I didn't recall 
an obviously &quot;best&quot; choice, and the one way made seemed to be among the 
less painful/bizarre.

To some degree, all of this is a reflection of the assymmetry in XML 
between attribute and element content:  if XML attributes were just an 
unordered grouping of named items that allowed the same content as 
elements (I.e. structured), then I think the distinction between complex 
and simple types would have fallen away naturally.  The content allowed by 
elements is a superset of that allowed for attributes, and that asymmetry 
must be reflected in the type system somehow.

Noah

--------------------------------------
Noah Mendelsohn 
IBM Corporation
One Rogers Street
Cambridge, MA 02142
1-617-693-4036
--------------------------------------</pre>]]></description>
<link>http://www.altova.com/list/xmlschema-dev/200810/msg1000287038.html</link>
</item><item>
<title>Re: Time wihtout Seconds - 10/13/2008 10:30:00 AM</title>
<description><![CDATA[<pre>----- Original Message From: &quot;Rowan Sylvester-Bradley&quot;

&gt; How do I write a schema that will validate an element containing a
&gt; time in the format hh:mm (without any seconds)? I'm trying to write
&gt; a schema for an existing XML file that's generated by a piece of
&gt; software which I have no access to, so I can't just add the seconds...

In that case you probably want to have a base type of an xs:string and then 
restrict it using an xs:pattern facet.  Something like:

&lt;xs:simpleType name=&quot;myTime&quot;&gt;
 &lt;xs:restriction base=&quot;xs:string&quot;&gt;
  &lt;xs:pattern value=&quot;[0-2][0-9]:[0-5][0-9]&quot;/&gt;
 &lt;/xs:restriction&gt;
&lt;/xs:simpleType&gt;

Or possibly even better:

&lt;xs:simpleType name=&quot;myTime&quot;&gt;
 &lt;xs:restriction base=&quot;xs:string&quot;&gt;
  &lt;xs:pattern value=&quot;[0-1][0-9]:[0-5][0-9]&quot;/&gt;
  &lt;xs:pattern value=&quot;2[0-3]:[0-5][0-9]&quot;/&gt;
 &lt;/xs:restriction&gt;
&lt;/xs:simpleType&gt;

(I'm pretty sure the pattern facets have an OR type relationship rather than 
an AND type relationship.  I'm sure someone will correct me if I'm wrong.)

HTH,

Pete Cordell
Codalogic Ltd
Interface XML to C++ the easy way using XML C++
data binding to convert XSD schemas to C++ classes.
Visit http://www.codalogic.com/lmx/ for more info



From rowan@sylvester-bradley.org Mon Oct 13 11:51:36 2008
Received: from maggie.w3</pre>]]></description>
<link>http://www.altova.com/list/xmlschema-dev/200810/msg1000287036.html</link>
</item><item>
<title>Time wihtout Seconds - 10/12/2008 12:42:00 AM</title>
<description><![CDATA[<pre>How do I write a schema that will validate an element containing a time =
in the format hh:mm (without any seconds)? I'm trying to write a schema =
for an existing XML file that's generated by a piece of software which I =
have no access to, so I can't just add the seconds...

Thanks - Rowan</pre>]]></description>
<link>http://www.altova.com/list/xmlschema-dev/200810/msg1000287034.html</link>
</item><item>
<title>Re: empty xs:extension of a simple type - 10/8/2008 4:26:00 PM</title>
<description><![CDATA[<pre>2008/10/8 Michael Kay &lt;mike@saxonica.com&gt;:
&gt;&gt;
&gt;&gt; I'm looking at a machine generate schema which contains this:
&gt;&gt;
&gt;&gt; &lt;xs:complexType name=&quot;foo&quot;&gt;
&gt;&gt;   &lt;xs:simpleContent&gt;
&gt;&gt;     &lt;xs:extension base=&quot;xs:string&quot;&gt;
&gt;&gt;     &lt;/xs:extension&gt;
&gt;&gt;   &lt;/xs:simpleContent&gt;
&gt;&gt; &lt;/xs:complexType&gt;
&gt;&gt;
&gt;&gt; That's just the same as type=&quot;xs:string&quot; isn't it?
&gt;&gt;
&gt;
&gt; Not quite. It's a complex type rather than a simple type. It validates the
&gt; same content as xs:string, but it can be extended and restricted (and
&gt; unioned and listed...) in different ways from xs:string. It's likely to
&gt; behave differently when you do Java data binding, and it's certainly
&gt; different when you do type-aware XQuery and XSLT.

Different in a good way or different in a bad way? :)

Depending on the answer to that, I'm wondering if instead of using
type=&quot;xs:string&quot; it would be worthwhile to have type=&quot;myString&quot; with:

&lt;xs:complexType name=&quot;myString&quot;&gt;
 &lt;xs:simpleContent&gt;
   &lt;xs:extension base=&quot;xs:string&quot;/&gt;
 &lt;/xs:simpleContent&gt;
&lt;/xs:complexType&gt;




-- 
Andrew Welch
http://andrewjwelch.com
Kernow: http://kernowforsaxon.sf.net/

From rowan@sylvester-bradley.org Mon Oct 13 07:18:27 2008
Received: from farnsworth.w3.org ([1</pre>]]></description>
<link>http://www.altova.com/list/xmlschema-dev/200810/msg1000287033.html</link>
</item><item>
<title>RE: empty xs:extension of a simple type - 10/8/2008 4:17:00 PM</title>
<description><![CDATA[<pre>&gt; 
&gt; I'm looking at a machine generate schema which contains this:
&gt; 
&gt; &lt;xs:complexType name=&quot;foo&quot;&gt;
&gt;   &lt;xs:simpleContent&gt;
&gt;     &lt;xs:extension base=&quot;xs:string&quot;&gt;
&gt;     &lt;/xs:extension&gt;
&gt;   &lt;/xs:simpleContent&gt;
&gt; &lt;/xs:complexType&gt;
&gt; 
&gt; That's just the same as type=&quot;xs:string&quot; isn't it?
&gt; 

Not quite. It's a complex type rather than a simple type. It validates the
same content as xs:string, but it can be extended and restricted (and
unioned and listed...) in different ways from xs:string. It's likely to
behave differently when you do Java data binding, and it's certainly
different when you do type-aware XQuery and XSLT.

It does raise the question of why simple types are something radically
different from complex types, rather than simply a special case of a complex
type that happens to define no children and no attributes.

Michael Kay
http://www.saxonica.com/


From andrew.j.welch@gmail.com Wed Oct 08 14:26:52 2008
Received: from</pre>]]></description>
<link>http://www.altova.com/list/xmlschema-dev/200810/msg1000287032.html</link>
</item><item>
<title>empty xs:extension of a simple type - 10/8/2008 3:47:00 PM</title>
<description><![CDATA[<pre>I'm looking at a machine generate schema which contains this:

&lt;xs:complexType name=&quot;foo&quot;&gt;
  &lt;xs:simpleContent&gt;
    &lt;xs:extension base=&quot;xs:string&quot;&gt;
    &lt;/xs:extension&gt;
  &lt;/xs:simpleContent&gt;
&lt;/xs:complexType&gt;

That's just the same as type=&quot;xs:string&quot; isn't it?


thanks

-- 
Andrew Welch
http://andrewjwelch.com
Kernow: http://kernowforsaxon.sf.net/

From mike@saxonica.com Wed Oct 08 14:17:54 2008
Received: from maggie</pre>]]></description>
<link>http://www.altova.com/list/xmlschema-dev/200810/msg1000287031.html</link>
</item>

</channel>
</rss>
