﻿<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom"><title type="text">XMLSCHEMA-DEV Mailing List</title><subtitle>XML Schema-DEV is an open, un-moderated email list about W3C XML Schema (XSD) development issues, including XML Schema tools, tutorials, specifications, syntax, data modeling, and more. XMLSCHEMA-DEV is a free XML Schema learning resource to help further your XML education.</subtitle><rights>Copyright 2004-2006 Progress Software Corporation. All Rights Reserved.</rights><link rel="alternate" type="text/html" hreflang="en" href="http://www.stylusstudio.com/blogs/schemadev/" /><link rel="self" type="text/xml" href="http://www.stylusstudio.com/feeds/atom/?f=3" /><id>http://www.stylusstudio.com/feeds/atom/?f=3</id><author><name>Stylus Studio</name><email>stylusstudio@stylusstudio.com</email></author><updated>2010-02-09T14:16:07Z</updated><entry><title>Re: XML Zebra, a path-based tool for generating diff fingerprints for  XML Schemas </title><id>http://xsd.stylusstudio.com/2010Feb/post02000.htm</id><link rel="alternate" type="text/html" href="http://xsd.stylusstudio.com/2010Feb/post02000.htm" /><updated>2010-02-06T22:31:04Z</updated><content type="text/plain"><![CDATA[<pre id="body">
<a name="start2" accesskey="j" id="start2"></a>Version 1.0-pre-2 of XML Zebra is now available.  It adds support for  
substitution groups, and you can now set namespace prefixes via the  
command line.

https://launchpad.net/xmlzebra/+announcement/5072

Cheers, Tony.

On Sun, 17 Jan 2010 21:01:38 -0000, Anthony B. Coates (W3C Lists)  
&lt;<a href="mailto:abcoatesecure-w3c&#x40;&#0121;&#0097;&#0104;&#0111;&#0111;&#0046;&#0099;&#0111;&#0046;&#0117;&#0107;?Subject=Re%3A%20XML%20Zebra%2C%20a%20path-based%20tool%20for%20generating%20diff%20fingerprints%20for%20%20XML%20Schemas&amp;In-Reply-To=%253Cop.u7p8t2s2beptyg%40ubuntuvm%253E&amp;References=%253Cop.u7p8t2s2beptyg%40ubuntuvm%253E">abcoatesecure-w3c&#x40;&#0121;&#0097;&#0104;&#0111;&#0111;&#0046;&#0099;&#0111;&#0046;&#0117;&#0107;</a>&gt; wrote:

&gt; I have written a tool (in Scala) that can be used to check the  
&gt; differences
&gt; between versions of a set of W3C XML Schemas.  The tool can be run with
&gt; Scala, <a title="Java" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/configure_jre.html">Java</a>, or Apache Ant.  The idea is that for each version, you  
&gt; create
&gt; a fingerprint file that contains paths (like XPaths, but with an extended
&gt; syntax).  By comparing the two fingerprint files for two versions, you  
&gt; can
&gt; see what has changed between the versions of the Schemas.  The tools  
&gt; makes
&gt; use of the XMLBeans API for examining the structure of W3C XML Schemas.
&gt;
&gt; How does this differ from just doing diffs of the individual <a title="Schema files" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema_editor.html">Schema files</a>
&gt; themselves?  The difference is that the path-based approach shows you not
&gt; only what has changed, but also shows all of the places that are directly
&gt; or indirectly impacted by the change.  Also, the path-based approach
&gt; ignores restructurings that don't impact users, like <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_grid_view.html">renaming</a> of Schema
&gt; types or moving <a title="How To Build XML Schemas" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/videos/xmlschema1/xmlschema1.html">of definitions to a different Schema</a> file.  Put another
&gt; way, the path-based approach allows you to evaluate how the Schemas have
&gt; changed from a user-impact perspective, rather than from a simple
&gt; file-change perspective.
&gt;
&gt; The software is open source, released under the Apache licence.  For more
&gt; details, and to download it, see
&gt;
&gt; http://www.xmlzebra.com/
&gt;
&gt; There will be a presentation about this software at the XML Prague 2010
&gt; conference, 13-14 March.
&gt;
&gt; http://www.xmlprague.cz/2010/index.html
&gt;
&gt; Feedback would be very welcome.  Thanks,
&gt;
&gt; Cheers, Tony.

-- 
Anthony B. Coates
Director and CTO
Londata Ltd
<a href="mailto:abcoates&#x40;&#0108;&#0111;&#0110;&#0100;&#0097;&#0116;&#0097;&#0046;&#0099;&#0111;&#0109;?Subject=Re%3A%20XML%20Zebra%2C%20a%20path-based%20tool%20for%20generating%20diff%20fingerprints%20for%20%20XML%20Schemas&amp;In-Reply-To=%253Cop.u7p8t2s2beptyg%40ubuntuvm%253E&amp;References=%253Cop.u7p8t2s2beptyg%40ubuntuvm%253E">abcoates&#x40;&#0108;&#0111;&#0110;&#0100;&#0097;&#0116;&#0097;&#0046;&#0099;&#0111;&#0109;</a>
UK: +44 (20) 8816 7700, US: +1 (239) 344 7700
Mobile/Cell: +44 (79) 0543 9026
Skype: abcoates
Data standards participant: genericode, ISO 20022 (ISO 15022 XML),  
<a title="UN/CEFACT" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/edifact/">UN/CEFACT</a>, MDDL, <a title="Learn more about FIXML" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/fixml.html">FpML</a>, <a title="UBL 2.0" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://schemas.stylusstudio.com/ubl/index.html">UBL</a>.
http://www.londata.com/
</pre>
<span id="received"><dfn>Received on</dfn> Saturday,  6 February 2010 22:31:42 GMT</span>
</div>
]]></content></entry><entry><title>a proposition about ID/IDREF and element optionality </title><id>http://xsd.stylusstudio.com/2010Feb/post01000.htm</id><link rel="alternate" type="text/html" href="http://xsd.stylusstudio.com/2010Feb/post01000.htm" /><updated>2010-02-05T18:03:58Z</updated><content type="text/plain"><![CDATA[<pre id="body">
<a name="start1" accesskey="j" id="start1"></a>A friend of mine was recently confronted with a curious claim
about <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema.html">XSD</a> schemas; let us call it proposition (1):

     ... a schema that supports id/idref use must make all
     attributes and elements optional...

This seemed implausible to them, so they consulted me, just to
make sure there was not some sub-clause of a sub-clause they had
overlooked.

I have assured them that unless there is a sub-clause of a
sub-clause which I have also overlooked, proposition (1) is
false.  Now, it's not unheard of for people to make mistakes
about XSD and for false statements to circulate as a result.
But what puzzles me is that I can't think of any true statement
about XSD that might have been misunderstood in such a way
as to give rise to proposition (1).

Have any readers of this list encountered this misconception
before?  Do you know how it arose?

Have any of the various &quot;best-practices&quot; documents which convey
advice <a title="Building XML Schemas" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/videos/xmlschema1/xmlschema1.html">for users of XSD</a> suggested such a thing?  Is there
some design discipline for XSD which prescribes optionality
for all things as the concomitant of ID/IDREF use (and if so,
what sects practice that discipline)?

And, of course, if you can point me to the sub-clause of a
sub-clause which makes proposition (1) true, I am eager to
be enlightened, even at the cost of public humiliation.

Thanks.

-- 
****************************************************************
* C. M. Sperberg-McQueen, Black Mesa Technologies LLC
* http://www.blackmesatech.com
* http://cmsmcq.com/mib
* http://balisage.net
****************************************************************
</pre>
<span id="received"><dfn>Received on</dfn> Saturday,  6 February 2010 01:04:29 GMT</span>
</div>
]]></content></entry><entry><title>[ANN] Xerces-C++ 3.1.0 released </title><id>http://xsd.stylusstudio.com/2010Feb/post00000.htm</id><link rel="alternate" type="text/html" href="http://xsd.stylusstudio.com/2010Feb/post00000.htm" /><updated>2010-02-02T14:32:03Z</updated><content type="text/plain"><![CDATA[<pre id="body">
<a name="start0" accesskey="j" id="start0"></a>Hi,

I am pleased to announce <a title="The Stylus Studio Xerces Framework" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml/xerces.html">the availability of Apache Xerces-C++ 3.1.0</a>.
Xerces-C++ is an open-source, validating <a title="parse xml" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml/parser.html">XML parser</a> written in a
portable subset of C++. It provides <a title="DOM Tutorial" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/dom.html">DOM</a> (level 1, 2, and 3), <a title="XML SAX" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/sax.html">SAX</a>,
and SAX2 APIs and supports validation of XML documents against DTD
and XML Schema.

This version includes a number of <a title="new features" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_product_new_features.html">new features</a>, performance improvements 
and a large number of bug fixes, especially in the <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/w3c/schema0/_index.htm">XML Schema spec</a> 
conformance area, including:

 * Support for handling multiple XML Schema import declarations with 
   the same target namespace.

 * Support for configuration of the parser buffer low water mark.

 * DOMLSParser::parseWithContext implementation.

 * Improved XML Schema performance and reduced memory footprint when 
   validating with large maxOccurs values. If available, the SSE2 
   instructions are used to further speedup this case.

 * Improved scalability of the XML Schema identity checking (key, 
   keyref, and unique).

 * More robust external library detection (libcurl and ICU).

 * Compilation of the ICU message loader resources no longer depends 
   on the ICU implementation details.

For a more detailed list of changes see the official announcement:

http://marc.info/?l=xerces-c-dev&amp;m=126502748921483&amp;w=2

For more information on some of the new features see this blog post:

http://www.codesynthesis.com/~boris/blog/2010/02/02/xerces-cxx-3-1-0-released

This release has been tested on all major platforms and comes with 
precompiled libraries (total 16) for various CPU architectures, 
operating systems, and C++ compilers. For most platforms 32-bit and 
64-bit variants are provided.

More information on Xerces-C++, including documentation and build
instructions, is available from the project's website:

http://xerces.apache.org/xerces-c/

The source code archives and precompiled binaries are available from
the download page:

http://xerces.apache.org/xerces-c/download.cgi

Boris

-- 
Boris Kolpackov, Code Synthesis        http://codesynthesis.com/~boris/blog
Open-source <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/jaxb.html">XML data binding</a> for C++   http://codesynthesis.com/products/xsd
XML data binding for embedded systems  http://codesynthesis.com/products/xsde
Command line interface to C++ compiler http://codesynthesis.com/projects/cli
</pre>
<span id="received"><dfn>Received on</dfn> Tuesday,  2 February 2010 12:32:33 GMT</span>
</div>
]]></content></entry><entry><title>Re: Need something like xs:sequence without order? </title><id>http://xsd.stylusstudio.com/2010Jan/post02003.htm</id><link rel="alternate" type="text/html" href="http://xsd.stylusstudio.com/2010Jan/post02003.htm" /><updated>2010-01-29T15:31:32Z</updated><content type="text/plain"><![CDATA[<pre id="body">
<a name="start32" accesskey="j" id="start32"></a>Thanks for your advice Noah and Michael!


2010/1/29 &lt;<a href="mailto:noah_mendelsohn&#x40;&#0117;&#0115;&#0046;&#0105;&#0098;&#0109;&#0046;&#0099;&#0111;&#0109;?Subject=Re%3A%20Need%20something%20like%20xs%3Asequence%20without%20order%3F&amp;In-Reply-To=%253Cb06e2691001290631p27e7156aw773c6ffd59511f26%40mail.gmail.com%253E&amp;References=%253Cb06e2691001290631p27e7156aw773c6ffd59511f26%40mail.gmail.com%253E">noah_mendelsohn&#x40;&#0117;&#0115;&#0046;&#0105;&#0098;&#0109;&#0046;&#0099;&#0111;&#0109;</a>&gt;

&gt; <a title="Interview Michael Kay - W3C XML Member and Founder of Saxonica" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/michael_kay.html">Michael Kay</a>'s <a title="Saxon" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/saxon_xquery_processor.html">Saxon</a> has support for at least much of <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema.html">XSD</a> 1.1.   I assume
&gt; but do not know for a fact that it supports <a title="XML SAX" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/sax.html">SAX</a>.  Michael follows this
&gt; list, I think, so he can give you more details if you don't find them
&gt; online.
&gt;
&gt; Noah
&gt;
&gt; --------------------------------------
&gt; Noah Mendelsohn
&gt; IBM Corporation
&gt; One Rogers Street
&gt; Cambridge, MA 02142
&gt; 1-617-693-4036
&gt; --------------------------------------
&gt;
&gt;
&gt;
&gt;
&gt;
&gt;
&gt;
&gt;
&gt; Felix Nensa &lt;<a href="mailto:nensa&#x40;&#0122;&#0101;&#0101;&#0099;&#0046;&#0098;&#0105;&#0122;?Subject=Re%3A%20Need%20something%20like%20xs%3Asequence%20without%20order%3F&amp;In-Reply-To=%253Cb06e2691001290631p27e7156aw773c6ffd59511f26%40mail.gmail.com%253E&amp;References=%253Cb06e2691001290631p27e7156aw773c6ffd59511f26%40mail.gmail.com%253E">nensa&#x40;&#0122;&#0101;&#0101;&#0099;&#0046;&#0098;&#0105;&#0122;</a>&gt;
&gt; 01/28/2010 07:09 PM
&gt;
&gt;        To:     <a href="mailto:noah_mendelsohn&#x40;&#0117;&#0115;&#0046;&#0105;&#0098;&#0109;&#0046;&#0099;&#0111;&#0109;?Subject=Re%3A%20Need%20something%20like%20xs%3Asequence%20without%20order%3F&amp;In-Reply-To=%253Cb06e2691001290631p27e7156aw773c6ffd59511f26%40mail.gmail.com%253E&amp;References=%253Cb06e2691001290631p27e7156aw773c6ffd59511f26%40mail.gmail.com%253E">noah_mendelsohn&#x40;&#0117;&#0115;&#0046;&#0105;&#0098;&#0109;&#0046;&#0099;&#0111;&#0109;</a>
&gt;        cc:     <a href="mailto:xmlschema-dev&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;?Subject=Re%3A%20Need%20something%20like%20xs%3Asequence%20without%20order%3F&amp;In-Reply-To=%253Cb06e2691001290631p27e7156aw773c6ffd59511f26%40mail.gmail.com%253E&amp;References=%253Cb06e2691001290631p27e7156aw773c6ffd59511f26%40mail.gmail.com%253E">xmlschema-dev&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;</a>, <a href="mailto:xmlschema-dev-request&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;?Subject=Re%3A%20Need%20something%20like%20xs%3Asequence%20without%20order%3F&amp;In-Reply-To=%253Cb06e2691001290631p27e7156aw773c6ffd59511f26%40mail.gmail.com%253E&amp;References=%253Cb06e2691001290631p27e7156aw773c6ffd59511f26%40mail.gmail.com%253E">xmlschema-dev-request&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;</a>
&gt;        Subject:        Re: Need something like <a title="xs:sequence" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema_editor.html">xs:sequence</a> without order?
&gt;
&gt;
&gt; Thank you for your reply.
&gt;
&gt; In <a title="XML Schema Tools" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema.html">schema 1.0</a>:
&gt;
&gt;       &lt;xsd:choice minOccurs=&quot;0&quot; maxOccurs=&quot;unbounded&quot;&gt;
&gt;               &lt;xsd:element ref=&quot;A&quot; /&gt;
&gt;               etc.
&gt;          ....references to A,B,C
&gt;
&gt; This is quite exacly what I am doing right now as a workaround.. with the
&gt; downsides you describe.
&gt;
&gt; In schema 1.1:
&gt;
&gt;       &lt;xsd:all&gt;
&gt;               &lt;xsd:element ref=&quot;A&quot; /&gt;
&gt;               [...]
&gt;               &lt;xsd:element ref=&quot;D&quot; minOccurs=&quot;0&quot; maxOccurs=&quot;2&gt;
&gt;
&gt; In other words, in schema 1.0, you can use choice, but you don't get to
&gt; tightly control the number of occurrences of each named element.   Schema
&gt; 1.1 can do the same, but it also allows you to use &lt;xsd:all&gt; with explicit
&gt; occurrence counts.  That could enforce, for example, that you wanted at
&gt; most two &quot;D&quot; elements, regardless of order with respect to the others.
&gt; Note that XSD 1.1 is still in Candidate Recommendation status and is not
&gt; yet widely deployed.
&gt;
&gt;
&gt; Do you know if there is any validating SAX parser for java that supports
&gt; Schema 1.1? I would like to give it a try.
&gt;
&gt; Thanks for your help,
&gt;
&gt; Felix
&gt;
&gt;
&gt;
&gt;
&gt; Felix Nensa &lt;<a href="mailto:nensa&#x40;&#0122;&#0101;&#0101;&#0099;&#0046;&#0098;&#0105;&#0122;?Subject=Re%3A%20Need%20something%20like%20xs%3Asequence%20without%20order%3F&amp;In-Reply-To=%253Cb06e2691001290631p27e7156aw773c6ffd59511f26%40mail.gmail.com%253E&amp;References=%253Cb06e2691001290631p27e7156aw773c6ffd59511f26%40mail.gmail.com%253E">nensa&#x40;&#0122;&#0101;&#0101;&#0099;&#0046;&#0098;&#0105;&#0122;</a>&gt;
&gt; Sent by: <a href="mailto:xmlschema-dev-request&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;?Subject=Re%3A%20Need%20something%20like%20xs%3Asequence%20without%20order%3F&amp;In-Reply-To=%253Cb06e2691001290631p27e7156aw773c6ffd59511f26%40mail.gmail.com%253E&amp;References=%253Cb06e2691001290631p27e7156aw773c6ffd59511f26%40mail.gmail.com%253E">xmlschema-dev-request&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;</a>
&gt; 01/28/2010 12:04 PM
&gt;
&gt;       To:     <a href="mailto:xmlschema-dev&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;?Subject=Re%3A%20Need%20something%20like%20xs%3Asequence%20without%20order%3F&amp;In-Reply-To=%253Cb06e2691001290631p27e7156aw773c6ffd59511f26%40mail.gmail.com%253E&amp;References=%253Cb06e2691001290631p27e7156aw773c6ffd59511f26%40mail.gmail.com%253E">xmlschema-dev&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;</a>
&gt;       cc:     (bcc: Noah Mendelsohn/Cambridge/IBM)
&gt;       Subject:        Need something like xs:sequence without order?
&gt;
&gt;
&gt; Hi experts,
&gt;
&gt; I have some tricky XML that needs to be validated against an XSD, that I
&gt; am not sure how to define.
&gt; The XML could come in several variations. Some examples:
&gt;
&gt; Example 1:
&gt;
&gt; &lt;SomeElement&gt;
&gt;  &lt;A&gt;aaa&lt;/A&gt;
&gt;  &lt;B&gt;bbb&lt;/B&gt;
&gt;  &lt;C&gt;ccc&lt;/C&gt;
&gt;  &lt;D&gt;ddd&lt;/D&gt;
&gt;  &lt;D&gt;dde&lt;/D&gt;
&gt; &lt;/SomeElement&gt;
&gt;
&gt; Example 2:
&gt;
&gt; &lt;SomeElement&gt;
&gt;  &lt;B&gt;bbb&lt;/B&gt;
&gt;  &lt;A&gt;aaa&lt;/A&gt;
&gt;  &lt;C&gt;ccc&lt;/C&gt;
&gt;  &lt;D&gt;ddd&lt;/D&gt;
&gt;  &lt;D&gt;dde&lt;/D&gt;
&gt; &lt;/SomeElement&gt;
&gt;
&gt; Example 3:
&gt;
&gt; &lt;SomeElement&gt;
&gt;  &lt;B&gt;bbb&lt;/B&gt;
&gt;  &lt;A&gt;aaa&lt;/A&gt;
&gt;  &lt;D&gt;ddd&lt;/D&gt;
&gt;  &lt;D&gt;dde&lt;/D&gt;
&gt; &lt;/SomeElement&gt;
&gt;
&gt;
&gt; The corresponding XSD that I would like to define (but of course is
&gt; invalid) would look like this:
&gt;
&gt; &lt;xs:element name=&quot;SomeElement&quot;&gt;
&gt;  &lt;xs:complexType&gt;
&gt;   &lt;xs:all&gt;
&gt;    &lt;xs:element name=&quot;A&quot; type=&quot;xs:string&quot; minOccurs=&quot;1&quot; maxOccurs=&quot;1&quot; /&gt;
&gt;    &lt;xs:element name=&quot;B&quot; type=&quot;xs:string&quot; minOccurs=&quot;1&quot; maxOccurs=&quot;1&quot; /&gt;
&gt;    &lt;xs:element name=&quot;C&quot; type=&quot;xs:string&quot; minOccurs=&quot;0&quot; maxOccurs=&quot;1&quot;
&gt; /&gt;
&gt;    &lt;xs:element name=&quot;D&quot; type=&quot;xs:string&quot; minOccurs=&quot;1&quot;
&gt; maxOccurs=&quot;unbounded&quot; /&gt;
&gt;
&gt;   &lt;/xs:all&gt;
&gt;  &lt;/xs:complexType&gt;
&gt; &lt;/xs:element&gt;
&gt;
&gt; Any ideas how to achive the same with valid XSD?
&gt; Thanks in advance,
&gt;
&gt; Felix
&gt;
&gt;
&gt;
&gt;
</pre>
<span id="received"><dfn>Received on</dfn> Friday, 29 January 2010 14:32:07 GMT</span>
</div>
]]></content></entry><entry><title>Re: Need something like xs:sequence without order? </title><id>http://xsd.stylusstudio.com/2010Jan/post09002.htm</id><link rel="alternate" type="text/html" href="http://xsd.stylusstudio.com/2010Jan/post09002.htm" /><updated>2010-01-29T01:09:45Z</updated><content type="text/plain"><![CDATA[<pre id="body">
<a name="start29" accesskey="j" id="start29"></a>Thank you for your reply.

In <a title="XML Schema Tools" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema.html">schema 1.0</a>:
&gt;
&gt;        &lt;xsd:choice minOccurs=&quot;0&quot; maxOccurs=&quot;unbounded&quot;&gt;
&gt;                &lt;<a title="xsd:element" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema_editor.html">xsd:element</a> ref=&quot;A&quot; /&gt;
&gt;                etc.
&gt;           ....references to A,B,C
&gt;

This is quite exacly what I am doing right now as a workaround.. with the
downsides you describe.


&gt; In schema 1.1:
&gt;
&gt;        &lt;xsd:all&gt;
&gt;                &lt;xsd:element ref=&quot;A&quot; /&gt;
&gt;                [...]
&gt;                &lt;xsd:element ref=&quot;D&quot; minOccurs=&quot;0&quot; maxOccurs=&quot;2&gt;
&gt;
&gt; In other words, in schema 1.0, you can use choice, but you don't get to
&gt; tightly control the number of occurrences of each named element.   Schema
&gt; 1.1 can do the same, but it also allows you to use &lt;xsd:all&gt; with explicit
&gt; occurrence counts.  That could enforce, for example, that you wanted at
&gt; most two &quot;D&quot; elements, regardless of order with respect to the others.
&gt; Note that XSD 1.1 is still in Candidate Recommendation status and is not
&gt; yet widely <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/deployment/">deployed</a>.
&gt;
&gt;
Do you know if there is any validating <a title="SAX Example" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/sax.html">SAX parser</a> for <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/configure_jre.html">java</a> that supports
Schema 1.1? I would like to give it a try.

Thanks for your help,

Felix


&gt;
&gt;
&gt; Felix Nensa &lt;<a href="mailto:nensa&#x40;&#0122;&#0101;&#0101;&#0099;&#0046;&#0098;&#0105;&#0122;?Subject=Re%3A%20Need%20something%20like%20xs%3Asequence%20without%20order%3F&amp;In-Reply-To=%253Cb06e2691001281609ne75a658rcbd121f4600bd975%40mail.gmail.com%253E&amp;References=%253Cb06e2691001281609ne75a658rcbd121f4600bd975%40mail.gmail.com%253E">nensa&#x40;&#0122;&#0101;&#0101;&#0099;&#0046;&#0098;&#0105;&#0122;</a>&gt;
&gt; Sent by: <a href="mailto:xmlschema-dev-request&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;?Subject=Re%3A%20Need%20something%20like%20xs%3Asequence%20without%20order%3F&amp;In-Reply-To=%253Cb06e2691001281609ne75a658rcbd121f4600bd975%40mail.gmail.com%253E&amp;References=%253Cb06e2691001281609ne75a658rcbd121f4600bd975%40mail.gmail.com%253E">xmlschema-dev-request&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;</a>
&gt; 01/28/2010 12:04 PM
&gt;
&gt;        To:     <a href="mailto:xmlschema-dev&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;?Subject=Re%3A%20Need%20something%20like%20xs%3Asequence%20without%20order%3F&amp;In-Reply-To=%253Cb06e2691001281609ne75a658rcbd121f4600bd975%40mail.gmail.com%253E&amp;References=%253Cb06e2691001281609ne75a658rcbd121f4600bd975%40mail.gmail.com%253E">xmlschema-dev&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;</a>
&gt;        cc:     (bcc: Noah Mendelsohn/Cambridge/IBM)
&gt;        Subject:        Need something like xs:sequence without order?
&gt;
&gt;
&gt; Hi experts,
&gt;
&gt; I have some tricky XML that needs to be <a title="Building XML Schemas" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/videos/xmlschema1/xmlschema1.html">validated against an XSD</a>, that I
&gt; am not sure how to define.
&gt; The XML could come in several variations. Some examples:
&gt;
&gt; Example 1:
&gt;
&gt; &lt;SomeElement&gt;
&gt;  &lt;A&gt;aaa&lt;/A&gt;
&gt;  &lt;B&gt;bbb&lt;/B&gt;
&gt;  &lt;C&gt;ccc&lt;/C&gt;
&gt;  &lt;D&gt;ddd&lt;/D&gt;
&gt;  &lt;D&gt;dde&lt;/D&gt;
&gt; &lt;/SomeElement&gt;
&gt;
&gt; Example 2:
&gt;
&gt; &lt;SomeElement&gt;
&gt;  &lt;B&gt;bbb&lt;/B&gt;
&gt;  &lt;A&gt;aaa&lt;/A&gt;
&gt;  &lt;C&gt;ccc&lt;/C&gt;
&gt;  &lt;D&gt;ddd&lt;/D&gt;
&gt;  &lt;D&gt;dde&lt;/D&gt;
&gt; &lt;/SomeElement&gt;
&gt;
&gt; Example 3:
&gt;
&gt; &lt;SomeElement&gt;
&gt;  &lt;B&gt;bbb&lt;/B&gt;
&gt;  &lt;A&gt;aaa&lt;/A&gt;
&gt;  &lt;D&gt;ddd&lt;/D&gt;
&gt;  &lt;D&gt;dde&lt;/D&gt;
&gt; &lt;/SomeElement&gt;
&gt;
&gt;
&gt; The corresponding XSD that I would like to define (but of course is
&gt; invalid) would look like this:
&gt;
&gt; &lt;xs:element name=&quot;SomeElement&quot;&gt;
&gt;  &lt;xs:complexType&gt;
&gt;    &lt;xs:all&gt;
&gt;     &lt;xs:element name=&quot;A&quot; type=&quot;xs:string&quot; minOccurs=&quot;1&quot; maxOccurs=&quot;1&quot; /&gt;
&gt;     &lt;xs:element name=&quot;B&quot; type=&quot;xs:string&quot; minOccurs=&quot;1&quot; maxOccurs=&quot;1&quot; /&gt;
&gt;     &lt;xs:element name=&quot;C&quot; type=&quot;xs:string&quot; minOccurs=&quot;0&quot; maxOccurs=&quot;1&quot;
&gt; /&gt;
&gt;     &lt;xs:element name=&quot;D&quot; type=&quot;xs:string&quot; minOccurs=&quot;1&quot;
&gt; maxOccurs=&quot;unbounded&quot; /&gt;
&gt;
&gt;    &lt;/xs:all&gt;
&gt;  &lt;/xs:complexType&gt;
&gt; &lt;/xs:element&gt;
&gt;
&gt; Any ideas how to achive the same with valid XSD?
&gt; Thanks in advance,
&gt;
&gt; Felix
&gt;
&gt;
</pre>
<span id="received"><dfn>Received on</dfn> Friday, 29 January 2010 00:10:14 GMT</span>
</div>
]]></content></entry><entry><title>RE: Need something like xs:sequence without order? </title><id>http://xsd.stylusstudio.com/2010Jan/post00003.htm</id><link rel="alternate" type="text/html" href="http://xsd.stylusstudio.com/2010Jan/post00003.htm" /><updated>2010-01-29T00:40:08Z</updated><content type="text/plain"><![CDATA[<pre id="body">
<a name="start30" accesskey="j" id="start30"></a> 


Do you know if there is any validating <a title="SAX Example" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/sax.html">SAX parser</a> for <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/configure_jre.html">java</a> that supports
<a title="Using XML Schema" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema.html">Schema 1.1</a>? I would like to give it a try.
 
 
These features of the XSD 1.1 specification are supported in <a title="Saxon" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/saxon_xquery_processor.html">Saxon</a>-EE 9.2.
(Saxon isn't actually an <a title="parse xml" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml/parser.html">XML parser</a>, but its <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/open_xsd_validation.html">schema validator</a> will validate
the event stream produced by any SAX parser). 
 
Regards,

<a title="Interview Michael Kay - W3C XML Member and Founder of Saxonica" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/michael_kay.html">Michael Kay</a>
http://www.saxonica.com/
http://twitter.com/michaelhkay 
</pre>
<span id="received"><dfn>Received on</dfn> Friday, 29 January 2010 00:40:40 GMT</span>
</div>
]]></content></entry><entry><title>Re: Need something like xs:sequence without order? </title><id>http://xsd.stylusstudio.com/2010Jan/post01003.htm</id><link rel="alternate" type="text/html" href="http://xsd.stylusstudio.com/2010Jan/post01003.htm" /><updated>2010-01-28T20:56:27Z</updated><content type="text/plain"><![CDATA[<pre id="body">
<a name="start31" accesskey="j" id="start31"></a><a title="Interview Michael Kay - W3C XML Member and Founder of Saxonica" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/michael_kay.html">Michael Kay</a>'s <a title="Saxon" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/saxon_xquery_processor.html">Saxon</a> has support for at least much of <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema.html">XSD</a> 1.1.   I assume 
but do not know for a fact that it supports <a title="XML SAX" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/sax.html">SAX</a>.  Michael follows this 
list, I think, so he can give you more details if you don't find them 
online.

Noah

--------------------------------------
Noah Mendelsohn 
IBM Corporation
One Rogers Street
Cambridge, MA 02142
1-617-693-4036
--------------------------------------








Felix Nensa &lt;<a href="mailto:nensa&#x40;&#0122;&#0101;&#0101;&#0099;&#0046;&#0098;&#0105;&#0122;?Subject=Re%3A%20Need%20something%20like%20xs%3Asequence%20without%20order%3F&amp;In-Reply-To=%253COFC527F6AD.3A328639-ON852576BA.000A8B30-852576BA.000AAB55%40lotus.com%253E&amp;References=%253COFC527F6AD.3A328639-ON852576BA.000A8B30-852576BA.000AAB55%40lotus.com%253E">nensa&#x40;&#0122;&#0101;&#0101;&#0099;&#0046;&#0098;&#0105;&#0122;</a>&gt;
01/28/2010 07:09 PM
 
        To:     <a href="mailto:noah_mendelsohn&#x40;&#0117;&#0115;&#0046;&#0105;&#0098;&#0109;&#0046;&#0099;&#0111;&#0109;?Subject=Re%3A%20Need%20something%20like%20xs%3Asequence%20without%20order%3F&amp;In-Reply-To=%253COFC527F6AD.3A328639-ON852576BA.000A8B30-852576BA.000AAB55%40lotus.com%253E&amp;References=%253COFC527F6AD.3A328639-ON852576BA.000A8B30-852576BA.000AAB55%40lotus.com%253E">noah_mendelsohn&#x40;&#0117;&#0115;&#0046;&#0105;&#0098;&#0109;&#0046;&#0099;&#0111;&#0109;</a>
        cc:     <a href="mailto:xmlschema-dev&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;?Subject=Re%3A%20Need%20something%20like%20xs%3Asequence%20without%20order%3F&amp;In-Reply-To=%253COFC527F6AD.3A328639-ON852576BA.000A8B30-852576BA.000AAB55%40lotus.com%253E&amp;References=%253COFC527F6AD.3A328639-ON852576BA.000A8B30-852576BA.000AAB55%40lotus.com%253E">xmlschema-dev&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;</a>, <a href="mailto:xmlschema-dev-request&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;?Subject=Re%3A%20Need%20something%20like%20xs%3Asequence%20without%20order%3F&amp;In-Reply-To=%253COFC527F6AD.3A328639-ON852576BA.000A8B30-852576BA.000AAB55%40lotus.com%253E&amp;References=%253COFC527F6AD.3A328639-ON852576BA.000A8B30-852576BA.000AAB55%40lotus.com%253E">xmlschema-dev-request&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;</a>
        Subject:        Re: Need something like <a title="xs:sequence" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema_editor.html">xs:sequence</a> without order?


Thank you for your reply.

In <a title="XML Schema Tools" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema.html">schema 1.0</a>:

       &lt;xsd:choice minOccurs=&quot;0&quot; maxOccurs=&quot;unbounded&quot;&gt;
               &lt;xsd:element ref=&quot;A&quot; /&gt;
               etc.
          ....references to A,B,C

This is quite exacly what I am doing right now as a workaround.. with the 
downsides you describe.
 
In schema 1.1:

       &lt;xsd:all&gt;
               &lt;xsd:element ref=&quot;A&quot; /&gt;
               [...]
               &lt;xsd:element ref=&quot;D&quot; minOccurs=&quot;0&quot; maxOccurs=&quot;2&gt;

In other words, in schema 1.0, you can use choice, but you don't get to
tightly control the number of occurrences of each named element.   Schema
1.1 can do the same, but it also allows you to use &lt;xsd:all&gt; with explicit
occurrence counts.  That could enforce, for example, that you wanted at
most two &quot;D&quot; elements, regardless of order with respect to the others.
Note that XSD 1.1 is still in Candidate Recommendation status and is not
yet widely deployed.


Do you know if there is any validating SAX parser for java that supports 
Schema 1.1? I would like to give it a try.
 
Thanks for your help,

Felix




Felix Nensa &lt;<a href="mailto:nensa&#x40;&#0122;&#0101;&#0101;&#0099;&#0046;&#0098;&#0105;&#0122;?Subject=Re%3A%20Need%20something%20like%20xs%3Asequence%20without%20order%3F&amp;In-Reply-To=%253COFC527F6AD.3A328639-ON852576BA.000A8B30-852576BA.000AAB55%40lotus.com%253E&amp;References=%253COFC527F6AD.3A328639-ON852576BA.000A8B30-852576BA.000AAB55%40lotus.com%253E">nensa&#x40;&#0122;&#0101;&#0101;&#0099;&#0046;&#0098;&#0105;&#0122;</a>&gt;
Sent by: <a href="mailto:xmlschema-dev-request&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;?Subject=Re%3A%20Need%20something%20like%20xs%3Asequence%20without%20order%3F&amp;In-Reply-To=%253COFC527F6AD.3A328639-ON852576BA.000A8B30-852576BA.000AAB55%40lotus.com%253E&amp;References=%253COFC527F6AD.3A328639-ON852576BA.000A8B30-852576BA.000AAB55%40lotus.com%253E">xmlschema-dev-request&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;</a>
01/28/2010 12:04 PM

       To:     <a href="mailto:xmlschema-dev&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;?Subject=Re%3A%20Need%20something%20like%20xs%3Asequence%20without%20order%3F&amp;In-Reply-To=%253COFC527F6AD.3A328639-ON852576BA.000A8B30-852576BA.000AAB55%40lotus.com%253E&amp;References=%253COFC527F6AD.3A328639-ON852576BA.000A8B30-852576BA.000AAB55%40lotus.com%253E">xmlschema-dev&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;</a>
       cc:     (bcc: Noah Mendelsohn/Cambridge/IBM)
       Subject:        Need something like xs:sequence without order?


Hi experts,

I have some tricky XML that needs to be validated against an XSD, that I
am not sure how to define.
The XML could come in several variations. Some examples:

Example 1:

&lt;SomeElement&gt;
 &lt;A&gt;aaa&lt;/A&gt;
 &lt;B&gt;bbb&lt;/B&gt;
 &lt;C&gt;ccc&lt;/C&gt;
 &lt;D&gt;ddd&lt;/D&gt;
 &lt;D&gt;dde&lt;/D&gt;
&lt;/SomeElement&gt;

Example 2:

&lt;SomeElement&gt;
 &lt;B&gt;bbb&lt;/B&gt;
 &lt;A&gt;aaa&lt;/A&gt;
 &lt;C&gt;ccc&lt;/C&gt;
 &lt;D&gt;ddd&lt;/D&gt;
 &lt;D&gt;dde&lt;/D&gt;
&lt;/SomeElement&gt;

Example 3:

&lt;SomeElement&gt;
 &lt;B&gt;bbb&lt;/B&gt;
 &lt;A&gt;aaa&lt;/A&gt;
 &lt;D&gt;ddd&lt;/D&gt;
 &lt;D&gt;dde&lt;/D&gt;
&lt;/SomeElement&gt;


The corresponding XSD that I would like to define (but of course is
invalid) would look like this:

&lt;xs:element name=&quot;SomeElement&quot;&gt;
 &lt;xs:complexType&gt;
   &lt;xs:all&gt;
    &lt;xs:element name=&quot;A&quot; type=&quot;xs:string&quot; minOccurs=&quot;1&quot; maxOccurs=&quot;1&quot; /&gt;
    &lt;xs:element name=&quot;B&quot; type=&quot;xs:string&quot; minOccurs=&quot;1&quot; maxOccurs=&quot;1&quot; /&gt;
    &lt;xs:element name=&quot;C&quot; type=&quot;xs:string&quot; minOccurs=&quot;0&quot; maxOccurs=&quot;1&quot;
/&gt;
    &lt;xs:element name=&quot;D&quot; type=&quot;xs:string&quot; minOccurs=&quot;1&quot;
maxOccurs=&quot;unbounded&quot; /&gt;

   &lt;/xs:all&gt;
 &lt;/xs:complexType&gt;
&lt;/xs:element&gt;

Any ideas how to achive the same with valid XSD?
Thanks in advance,

Felix
</pre>
<span id="received"><dfn>Received on</dfn> Friday, 29 January 2010 01:57:05 GMT</span>
</div>
]]></content></entry><entry><title>Need something like xs:sequence without order? </title><id>http://xsd.stylusstudio.com/2010Jan/post07002.htm</id><link rel="alternate" type="text/html" href="http://xsd.stylusstudio.com/2010Jan/post07002.htm" /><updated>2010-01-28T18:04:19Z</updated><content type="text/plain"><![CDATA[<pre id="body">
<a name="start27" accesskey="j" id="start27"></a>Hi experts,

I have some tricky <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">XML</a> that needs to be <a title="Building XML Schemas" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/videos/xmlschema1/xmlschema1.html">validated against an XSD</a>, that I am
not sure how to define.
The XML could come in several variations. Some examples:

Example 1:

&lt;SomeElement&gt;
  &lt;A&gt;aaa&lt;/A&gt;
  &lt;B&gt;bbb&lt;/B&gt;
  &lt;C&gt;ccc&lt;/C&gt;
  &lt;D&gt;ddd&lt;/D&gt;
  &lt;D&gt;dde&lt;/D&gt;
&lt;/SomeElement&gt;

Example 2:

&lt;SomeElement&gt;
  &lt;B&gt;bbb&lt;/B&gt;
  &lt;A&gt;aaa&lt;/A&gt;
  &lt;C&gt;ccc&lt;/C&gt;
  &lt;D&gt;ddd&lt;/D&gt;
  &lt;D&gt;dde&lt;/D&gt;
&lt;/SomeElement&gt;

Example 3:

&lt;SomeElement&gt;
  &lt;B&gt;bbb&lt;/B&gt;
  &lt;A&gt;aaa&lt;/A&gt;
  &lt;D&gt;ddd&lt;/D&gt;
  &lt;D&gt;dde&lt;/D&gt;
&lt;/SomeElement&gt;


The corresponding XSD that I would like to define (but of course is invalid)
would look like this:

&lt;<a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema_editor.html">xs:element</a> name=&quot;SomeElement&quot;&gt;
  &lt;xs:complexType&gt;
    &lt;xs:all&gt;
     &lt;xs:element name=&quot;A&quot; type=&quot;xs:string&quot; minOccurs=&quot;1&quot; maxOccurs=&quot;1&quot; /&gt;
     &lt;xs:element name=&quot;B&quot; type=&quot;xs:string&quot; minOccurs=&quot;1&quot; maxOccurs=&quot;1&quot; /&gt;
     &lt;xs:element name=&quot;C&quot; type=&quot;xs:string&quot; minOccurs=&quot;0&quot; maxOccurs=&quot;1&quot; /&gt;

     &lt;xs:element name=&quot;D&quot; type=&quot;xs:string&quot; minOccurs=&quot;1&quot;
maxOccurs=&quot;unbounded&quot; /&gt;

    &lt;/xs:all&gt;
  &lt;/xs:complexType&gt;
&lt;/xs:element&gt;

Any ideas how to achive the same with valid XSD?
Thanks in advance,

Felix
</pre>
<span id="received"><dfn>Received on</dfn> Thursday, 28 January 2010 21:35:55 GMT</span>
</div>
]]></content></entry><entry><title>Re: Need something like xs:sequence without order? </title><id>http://xsd.stylusstudio.com/2010Jan/post08002.htm</id><link rel="alternate" type="text/html" href="http://xsd.stylusstudio.com/2010Jan/post08002.htm" /><updated>2010-01-28T17:31:17Z</updated><content type="text/plain"><![CDATA[<pre id="body">
<a name="start28" accesskey="j" id="start28"></a>In <a title="XML Schema Tools" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema.html">schema 1.0</a>:

        &lt;xsd:choice minOccurs=&quot;0&quot; maxOccurs=&quot;unbounded&quot;&gt;
                &lt;<a title="xsd:element" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema_editor.html">xsd:element</a> ref=&quot;A&quot; /&gt;
                etc.
           ....references to A,B,C

In schema 1.1:

        &lt;xsd:all&gt;
                &lt;xsd:element ref=&quot;A&quot; /&gt;
                [...]
                &lt;xsd:element ref=&quot;D&quot; minOccurs=&quot;0&quot; maxOccurs=&quot;2&gt;

In other words, in schema 1.0, you can use choice, but you don't get to 
tightly control the number of occurrences of each named element.   Schema 
1.1 can do the same, but it also allows you to use &lt;xsd:all&gt; with explicit 
occurrence counts.  That could enforce, for example, that you wanted at 
most two &quot;D&quot; elements, regardless of order with respect to the others. 
Note that XSD 1.1 is still in Candidate Recommendation status and is not 
yet widely <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/deployment/">deployed</a>.

Noah

--------------------------------------
Noah Mendelsohn 
IBM Corporation
One Rogers Street
Cambridge, MA 02142
1-617-693-4036
--------------------------------------








Felix Nensa &lt;<a href="mailto:nensa&#x40;&#0122;&#0101;&#0101;&#0099;&#0046;&#0098;&#0105;&#0122;?Subject=Re%3A%20Need%20something%20like%20xs%3Asequence%20without%20order%3F&amp;In-Reply-To=%253COFE8FAADD6.F1B44D85-ON852576B9.007B43EE-852576B9.007BAD0C%40lotus.com%253E&amp;References=%253COFE8FAADD6.F1B44D85-ON852576B9.007B43EE-852576B9.007BAD0C%40lotus.com%253E">nensa&#x40;&#0122;&#0101;&#0101;&#0099;&#0046;&#0098;&#0105;&#0122;</a>&gt;
Sent by: <a href="mailto:xmlschema-dev-request&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;?Subject=Re%3A%20Need%20something%20like%20xs%3Asequence%20without%20order%3F&amp;In-Reply-To=%253COFE8FAADD6.F1B44D85-ON852576B9.007B43EE-852576B9.007BAD0C%40lotus.com%253E&amp;References=%253COFE8FAADD6.F1B44D85-ON852576B9.007B43EE-852576B9.007BAD0C%40lotus.com%253E">xmlschema-dev-request&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;</a>
01/28/2010 12:04 PM
 
        To:     <a href="mailto:xmlschema-dev&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;?Subject=Re%3A%20Need%20something%20like%20xs%3Asequence%20without%20order%3F&amp;In-Reply-To=%253COFE8FAADD6.F1B44D85-ON852576B9.007B43EE-852576B9.007BAD0C%40lotus.com%253E&amp;References=%253COFE8FAADD6.F1B44D85-ON852576B9.007B43EE-852576B9.007BAD0C%40lotus.com%253E">xmlschema-dev&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;</a>
        cc:     (bcc: Noah Mendelsohn/Cambridge/IBM)
        Subject:        Need something like xs:sequence without order?


Hi experts,

I have some tricky XML that needs to be <a title="Building XML Schemas" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/videos/xmlschema1/xmlschema1.html">validated against an XSD</a>, that I 
am not sure how to define.
The XML could come in several variations. Some examples:

Example 1:

&lt;SomeElement&gt;
  &lt;A&gt;aaa&lt;/A&gt;
  &lt;B&gt;bbb&lt;/B&gt;
  &lt;C&gt;ccc&lt;/C&gt;
  &lt;D&gt;ddd&lt;/D&gt;
  &lt;D&gt;dde&lt;/D&gt;
&lt;/SomeElement&gt;

Example 2:

&lt;SomeElement&gt;
  &lt;B&gt;bbb&lt;/B&gt;
  &lt;A&gt;aaa&lt;/A&gt;
  &lt;C&gt;ccc&lt;/C&gt;
  &lt;D&gt;ddd&lt;/D&gt;
  &lt;D&gt;dde&lt;/D&gt;
&lt;/SomeElement&gt;

Example 3:

&lt;SomeElement&gt;
  &lt;B&gt;bbb&lt;/B&gt;
  &lt;A&gt;aaa&lt;/A&gt;
  &lt;D&gt;ddd&lt;/D&gt;
  &lt;D&gt;dde&lt;/D&gt;
&lt;/SomeElement&gt;


The corresponding XSD that I would like to define (but of course is 
invalid) would look like this:

&lt;xs:element name=&quot;SomeElement&quot;&gt;
  &lt;xs:complexType&gt;
    &lt;xs:all&gt;                                          
     &lt;xs:element name=&quot;A&quot; type=&quot;xs:string&quot; minOccurs=&quot;1&quot; maxOccurs=&quot;1&quot; /&gt;
     &lt;xs:element name=&quot;B&quot; type=&quot;xs:string&quot; minOccurs=&quot;1&quot; maxOccurs=&quot;1&quot; /&gt;
     &lt;xs:element name=&quot;C&quot; type=&quot;xs:string&quot; minOccurs=&quot;0&quot; maxOccurs=&quot;1&quot; 
/&gt;                  
     &lt;xs:element name=&quot;D&quot; type=&quot;xs:string&quot; minOccurs=&quot;1&quot; 
maxOccurs=&quot;unbounded&quot; /&gt;                                                
                    
    &lt;/xs:all&gt;
  &lt;/xs:complexType&gt;
&lt;/xs:element&gt;

Any ideas how to achive the same with valid XSD?
Thanks in advance,

Felix
</pre>
<span id="received"><dfn>Received on</dfn> Thursday, 28 January 2010 22:31:53 GMT</span>
</div>
]]></content></entry><entry><title>Re: XSD to extend a &amp;quot;closed&amp;quot; schema </title><id>http://xsd.stylusstudio.com/2010Jan/post06002.htm</id><link rel="alternate" type="text/html" href="http://xsd.stylusstudio.com/2010Jan/post06002.htm" /><updated>2010-01-19T11:03:06Z</updated><content type="text/plain"><![CDATA[<pre id="body">
<a name="start26" accesskey="j" id="start26"></a>You may look also into NVDL. That allows validating the configuration 
file without your additional attributes against the initial <a title="schema" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema.html">schema</a> and 
you can allow or <a title="Using XML Schema to Model XML Data" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/videos/xmlschema1/xmlschema1.html">validate your attributes against a schema</a> that defines 
them.

A sample NVDL script that validates the configuration file and allows 
your attributes is below

&lt;?xml version=&quot;1.0&quot; <a title="encoding" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_other.html">encoding</a>=&quot;UTF-8&quot;?&gt;
&lt;rules xmlns=&quot;http://purl.oclc.org/dsdl/nvdl/ns/structure/1.0&quot;&gt;
   &lt;anyNamespace&gt;
     &lt;validate schema=&quot;official.xsd&quot;&gt;
       &lt;mode&gt;
         &lt;namespace ns=&quot;http://www.example.com/myeditor&quot; match=&quot;attributes&quot;&gt;
           &lt;allow/&gt;
         &lt;/namespace&gt;
         &lt;anyNamespace&gt;&lt;attach/&gt;&lt;/anyNamespace&gt;
       &lt;/mode&gt;
     &lt;/validate&gt;
   &lt;/anyNamespace&gt;
&lt;/rules&gt;

Best Regards,
George
-- 
George Cristian Bina
&lt;oXygen/&gt; <a title="Best XML Editor" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/">XML Editor</a>, Schema <a title="Building XSLT Stylesheet Applications" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/videos/xsltedit1/xsltedit1.html">Editor and XSLT</a> Editor/Debugger
http://www.oxygenxml.com

sweavo wrote:
&gt; 
&gt; 
&gt; George Cristian Bina-2 wrote:
&gt;&gt; You can just use PIs and keep the schema as it is.
&gt;&gt;
&gt;&gt; For example instead of
&gt;&gt;
&gt;&gt; &lt;official:configitem official:name=&quot;a_name&quot; myeditor:x=&quot;100&quot;
&gt;&gt; myeditor:y=&quot;100&quot;
&gt;&gt; myeditor:colour=&quot;red&quot;&gt;&lt;official:childelement....&gt;&lt;/official:configitem&gt;
&gt;&gt;
&gt;&gt; you can have:
&gt;&gt;
&gt;&gt; &lt;?myeditor x=100 y=100 colour=&quot;red&quot;?&gt;
&gt;&gt; &lt;official:configitem official:name=&quot;a_name&quot;&gt;
&gt;&gt;    &lt;official:childelement....&gt;
&gt;&gt; &lt;/official:configitem&gt;
&gt;&gt;
&gt; 
&gt; Thanks for the suggestion. This could end up being a suitable workaround.
&gt; But really it is not an ideal solution because the myeditor:x and y
&gt; attributes really do belong to the <a title="DOM Example" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/dom.html">dom node</a>; as a PI they are a sibling in
&gt; the DOM and rely on third parties maintaining the sequence and not putting
&gt; additional elements in between. 
</pre>
<span id="received"><dfn>Received on</dfn> Tuesday, 19 January 2010 09:03:35 GMT</span>
</div>
]]></content></entry><entry><title>Re: XSD to extend a &amp;quot;closed&amp;quot; schema </title><id>http://xsd.stylusstudio.com/2010Jan/post04002.htm</id><link rel="alternate" type="text/html" href="http://xsd.stylusstudio.com/2010Jan/post04002.htm" /><updated>2010-01-19T08:16:06Z</updated><content type="text/plain"><![CDATA[<pre id="body">
<a name="start24" accesskey="j" id="start24"></a>You can just <a title="Schema Tutorial" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/videos/xmlschema1/xmlschema1.html">use PIs and keep the schema</a> as it is.

For example instead of

&lt;official:configitem official:name=&quot;a_name&quot; myeditor:x=&quot;100&quot;
myeditor:y=&quot;100&quot;
myeditor:colour=&quot;red&quot;&gt;&lt;official:childelement....&gt;&lt;/official:configitem&gt;

you can have:

&lt;?myeditor x=100 y=100 colour=&quot;red&quot;?&gt;
&lt;official:configitem official:name=&quot;a_name&quot;&gt;
   &lt;official:childelement....&gt;
&lt;/official:configitem&gt;

Best Regards,
George
-- 
George Cristian Bina
&lt;oXygen/&gt; <a title="Best XML Editor" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/">XML Editor</a>, Schema <a title="Building XSLT Stylesheet Applications" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/videos/xsltedit1/xsltedit1.html">Editor and XSLT</a> Editor/Debugger
http://www.oxygenxml.com

sweavo wrote:
&gt; Hi All,
&gt; 
&gt; Apologies if this has been done to death, I'm not even sure of what search
&gt; terms might help me here. I've googled and read around but seem to be stuck.
&gt; 
&gt; I have a schema (that I'm not allowed to edit) that specifies how
&gt; configuration files should be laid out.  From time to time I receive an
&gt; update from the committee in charge and the new version must be used.
&gt; 
&gt; I have written several <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml/editor/">tools</a> for editing these config files, and it would be
&gt; nice to embed information in the XML (instance document) for the tools to
&gt; use when manipulating the XML. So I'm looking for the file to contain
&gt; something like:
&gt; 
&gt; &lt;official:configitem official:name=&quot;a_name&quot; myeditor:x=&quot;100&quot;
&gt; myeditor:y=&quot;100&quot;
&gt; myeditor:colour=&quot;red&quot;&gt;&lt;official:childelement....&gt;&lt;/official:configitem&gt;
&gt; 
&gt; I have googled and read several pages and it looks like I can only do this
&gt; if the type definitions in the official XSD include an anyAttribute
&gt; declaration (unfortunately that declaration is not present in the official
&gt; XSD).
&gt; 
&gt; Can anyone confirm or deny whether this is true?
&gt; 
&gt; Or is there a way for me to declare in the myeditor XSD that attribute x can
&gt; be applied to any element in the official namespace...?
&gt; 
&gt; Thanks in advance...
&gt; 
</pre>
<span id="received"><dfn>Received on</dfn> Tuesday, 19 January 2010 06:16:37 GMT</span>
</div>
]]></content></entry><entry><title>Re: XSD to extend a &amp;quot;closed&amp;quot; schema </title><id>http://xsd.stylusstudio.com/2010Jan/post05002.htm</id><link rel="alternate" type="text/html" href="http://xsd.stylusstudio.com/2010Jan/post05002.htm" /><updated>2010-01-19T00:42:33Z</updated><content type="text/plain"><![CDATA[<pre id="body">
<a name="start25" accesskey="j" id="start25"></a>


George Cristian Bina-2 wrote:
&gt; 
&gt; You can just <a title="Schema Tutorial" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/videos/xmlschema1/xmlschema1.html">use PIs and keep the schema</a> as it is.
&gt; 
&gt; For example instead of
&gt; 
&gt; &lt;official:configitem official:name=&quot;a_name&quot; myeditor:x=&quot;100&quot;
&gt; myeditor:y=&quot;100&quot;
&gt; myeditor:colour=&quot;red&quot;&gt;&lt;official:childelement....&gt;&lt;/official:configitem&gt;
&gt; 
&gt; you can have:
&gt; 
&gt; &lt;?myeditor x=100 y=100 colour=&quot;red&quot;?&gt;
&gt; &lt;official:configitem official:name=&quot;a_name&quot;&gt;
&gt;    &lt;official:childelement....&gt;
&gt; &lt;/official:configitem&gt;
&gt; 

Thanks for the suggestion. This could end up being a suitable workaround.
But really it is not an ideal solution because the myeditor:x and y
attributes really do belong to the <a title="DOM Example" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/dom.html">dom node</a>; as a PI they are a sibling in
the DOM and rely on third parties maintaining the sequence and not putting
additional elements in between. 
-- 
View this message in context: http://old.nabble.com/XSD-to-extend-a-%22closed%22-schema-tp27212594p27222526.html
Sent from the <a title="w3" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/w3c/">w3</a>.org - <a title="xmlschema-dev" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://xsd.stylusstudio.com">xmlschema-dev</a> <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/feeds/">mailing list</a> archive at Nabble.com.
</pre>
<span id="received"><dfn>Received on</dfn> Tuesday, 19 January 2010 08:43:04 GMT</span>
</div>
]]></content></entry><entry><title>XSD Unit testing </title><id>http://xsd.stylusstudio.com/2010Jan/post02002.htm</id><link rel="alternate" type="text/html" href="http://xsd.stylusstudio.com/2010Jan/post02002.htm" /><updated>2010-01-18T11:45:40Z</updated><content type="text/plain"><![CDATA[<pre id="body">
<a name="start22" accesskey="j" id="start22"></a>Hi there,

  What are people <a title="Schema Tutorial" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/videos/xmlschema1/xmlschema1.html">using for doing XSD</a> unit testing ? Has anyone used SUT ?

Ref:
http://sut.sf.net

Thanks for comments,
-- 
Mathieu
</pre>
<span id="received"><dfn>Received on</dfn> Monday, 18 January 2010 10:46:32 GMT</span>
</div>
]]></content></entry><entry><title>Re: url versus urn for namespace uri? </title><id>http://xsd.stylusstudio.com/2010Jan/post01002.htm</id><link rel="alternate" type="text/html" href="http://xsd.stylusstudio.com/2010Jan/post01002.htm" /><updated>2010-01-18T10:23:05Z</updated><content type="text/plain"><![CDATA[<pre id="body">
<a name="start21" accesskey="j" id="start21"></a>-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Some of the reasoning behind the <a title="W3C" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/w3c/">W3C</a> recommendation that you should
not only use an http: URI to identify your namespaces, but that you
also document your namespace at that URI (the policy which Michale Kay
disagress with) can be found at

  http://www.w3.org/TR/webarch/#namespace-document

A more extended <a title="discussion" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/SSDN/default.asp">discussion</a> of the value for the Web of including in
such a document machine-readable information such as provided by RDDL
or GRDDL, see also

  http://www.w3.org/2001/tag/doc/selfDescribingDocuments

ht
- -- 
       Henry S. Thompson, School of Informatics, University of Edinburgh
                         Half-time member of W3C Team
      10 Crichton Street, Edinburgh EH8 9AB, SCOTLAND -- (44) 131 650-4440
                Fax: (44) 131 651-1426, e-mail: <a href="mailto:ht&#x40;&#0105;&#0110;&#0102;&#0046;&#0101;&#0100;&#0046;&#0097;&#0099;&#0046;&#0117;&#0107;?Subject=Re%3A%20url%20versus%20urn%20for%20namespace%20uri%3F&amp;In-Reply-To=%253Cf5baawbogom.fsf%40calexico.inf.ed.ac.uk%253E&amp;References=%253Cf5baawbogom.fsf%40calexico.inf.ed.ac.uk%253E">ht&#x40;&#0105;&#0110;&#0102;&#0046;&#0101;&#0100;&#0046;&#0097;&#0099;&#0046;&#0117;&#0107;</a>
                       URL: http://www.ltg.ed.ac.uk/~ht/
[mail really from me _always_ has this .sig -- mail without it is forged spam]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)

iD8DBQFLVDaJkjnJixAXWBoRAgQ4AJ0VbjZc9Ngm2hjOO+KiM0timzVq3ACfdp7h
A5c0mAspGJJ/s4D1jgKwtgs=
=+f4P
-----END PGP SIGNATURE-----
</pre>
<span id="received"><dfn>Received on</dfn> Monday, 18 January 2010 10:23:35 GMT</span>
</div>
]]></content></entry><entry><title>RE: url versus urn for namespace uri? </title><id>http://xsd.stylusstudio.com/2010Jan/post00002.htm</id><link rel="alternate" type="text/html" href="http://xsd.stylusstudio.com/2010Jan/post00002.htm" /><updated>2010-01-18T09:49:13Z</updated><content type="text/plain"><![CDATA[<pre id="body">
<a name="start20" accesskey="j" id="start20"></a>&gt; 1) Are there any pros and cons for using a URN for a 
&gt; namespace URI?  It seems that most people use URLs but I feel 
&gt; like that adds to the confusion with people expecting that 
&gt; URL to have something there if you go to it with a web browser.

Some people like to use a namespace URI that can be dereferenced to locate a
&quot;namespace document&quot; of some kind. This is <a title="standard" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/w3c/">standard</a> practice in W3C, for
example.

In my mind this represents a gross confusion: a URI should uniquely identify
a single thing, and using the same URI to identify a namespace as well as a
document containing a human-readable or machine-readable description of the
namespace is a cheat. It's confusing the thing with a document describing
the thing. But it's an established convention, so who am I to argue?

The rot of using URIs starting with &quot;http&quot; set in a long time ago, and it's
probably best to just swim with the tide.

Regards,

<a title="Interview Michael Kay - W3C XML Member and Founder of Saxonica" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/michael_kay.html">Michael Kay</a>
http://www.saxonica.com/
http://twitter.com/michaelhkay 
</pre>
<span id="received"><dfn>Received on</dfn> Monday, 18 January 2010 09:49:42 GMT</span>
</div>
]]></content></entry><entry><title>XSD to extend a &amp;quot;closed&amp;quot; schema </title><id>http://xsd.stylusstudio.com/2010Jan/post03002.htm</id><link rel="alternate" type="text/html" href="http://xsd.stylusstudio.com/2010Jan/post03002.htm" /><updated>2010-01-18T08:02:31Z</updated><content type="text/plain"><![CDATA[<pre id="body">
<a name="start23" accesskey="j" id="start23"></a>Hi All,

Apologies if this has been done to death, I'm not even sure of what search
terms might help me here. I've googled and read around but seem to be stuck.

I have a <a title="schema" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema.html">schema</a> (that I'm not allowed to edit) that specifies how
configuration files should be laid out.  From time to time I receive an
update from the committee in charge and the new version must be used.

I have written several <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml/editor/">tools</a> for editing these config files, and it would be
nice to embed information in the XML (instance document) for the tools to
use when manipulating the XML. So I'm looking for the file to contain
something like:

&lt;official:configitem official:name=&quot;a_name&quot; myeditor:x=&quot;100&quot;
myeditor:y=&quot;100&quot;
myeditor:colour=&quot;red&quot;&gt;&lt;official:childelement....&gt;&lt;/official:configitem&gt;

I have googled and read several pages and it looks like I can only do this
if the type <a title="definitions in the official XSD" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/videos/xmlschema1/xmlschema1.html">definitions in the official XSD</a> include an anyAttribute
declaration (unfortunately that declaration is not present in the official
XSD).

Can anyone confirm or deny whether this is true?

Or is there a way for me to declare in the myeditor XSD that attribute x can
be applied to any element in the official namespace...?

Thanks in advance...

-- 
View this message in context: http://old.nabble.com/XSD-to-extend-a-%22closed%22-schema-tp27212594p27212594.html
Sent from the <a title="w3" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/w3c/">w3</a>.org - <a title="xmlschema-dev" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://xsd.stylusstudio.com">xmlschema-dev</a> <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/feeds/">mailing list</a> archive at Nabble.com.
</pre>
<span id="received"><dfn>Received on</dfn> Tuesday, 19 January 2010 00:03:17 GMT</span>
</div>
]]></content></entry><entry><title>XML Zebra, a path-based tool for generating diff fingerprints for XML  Schemas </title><id>http://xsd.stylusstudio.com/2010Jan/post08001.htm</id><link rel="alternate" type="text/html" href="http://xsd.stylusstudio.com/2010Jan/post08001.htm" /><updated>2010-01-17T21:01:38Z</updated><content type="text/plain"><![CDATA[<pre id="body">
<a name="start18" accesskey="j" id="start18"></a>I have written a tool (in Scala) that can be used to check the differences
between versions of a set of W3C XML Schemas.  The tool can be run with
Scala, <a title="Java" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/configure_jre.html">Java</a>, or Apache Ant.  The idea is that for each version, you create
a fingerprint file that contains paths (like XPaths, but with an extended
syntax).  By comparing the two fingerprint files for two versions, you can
see what has changed between the versions of the Schemas.  The tools makes
use of the XMLBeans API for examining the structure of W3C XML Schemas.

How does this differ from just doing diffs of the individual <a title="Schema files" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema_editor.html">Schema files</a>
themselves?  The difference is that the path-based approach shows you not
only what has changed, but also shows all of the places that are directly
or indirectly impacted by the change.  Also, the path-based approach
ignores restructurings that don't impact users, like <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_grid_view.html">renaming</a> of Schema
types or moving <a title="How To Build XML Schemas" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/videos/xmlschema1/xmlschema1.html">of definitions to a different Schema</a> file.  Put another
way, the path-based approach allows you to evaluate how the Schemas have
changed from a user-impact perspective, rather than from a simple
file-change perspective.

The software is open source, released under the Apache licence.  For more
details, and to download it, see

http://www.xmlzebra.com/

There will be a presentation about this software at the XML Prague 2010
conference, 13-14 March.

http://www.xmlprague.cz/2010/index.html

Feedback would be very welcome.  Thanks,

Cheers, Tony.
-- 
Anthony B. Coates
Director and CTO
Londata Ltd
<a href="mailto:abcoates&#x40;&#0108;&#0111;&#0110;&#0100;&#0097;&#0116;&#0097;&#0046;&#0099;&#0111;&#0109;?Subject=Re%3A%20XML%20Zebra%2C%20a%20path-based%20tool%20for%20generating%20diff%20fingerprints%20for%20XML%20%20Schemas&amp;In-Reply-To=%253Cop.u6o3c0vubeptyg%40ubuntuvm%253E&amp;References=%253Cop.u6o3c0vubeptyg%40ubuntuvm%253E">abcoates&#x40;&#0108;&#0111;&#0110;&#0100;&#0097;&#0116;&#0097;&#0046;&#0099;&#0111;&#0109;</a>
UK: +44 (20) 8816 7700, US: +1 (239) 344 7700
Mobile/Cell: +44 (79) 0543 9026
Skype: abcoates
Data standards participant: genericode, ISO 20022 (ISO 15022 XML),  
<a title="UN/CEFACT" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/edifact/">UN/CEFACT</a>, MDDL, <a title="Learn more about FIXML" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/fixml.html">FpML</a>, <a title="UBL 2.0" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://schemas.stylusstudio.com/ubl/index.html">UBL</a>.
http://www.londata.com/
</pre>
<span id="received"><dfn>Received on</dfn> Sunday, 17 January 2010 21:02:12 GMT</span>
</div>
]]></content></entry><entry><title>url versus urn for namespace uri? </title><id>http://xsd.stylusstudio.com/2010Jan/post09001.htm</id><link rel="alternate" type="text/html" href="http://xsd.stylusstudio.com/2010Jan/post09001.htm" /><updated>2010-01-16T23:49:07Z</updated><content type="text/plain"><![CDATA[<pre id="body">
<a name="start19" accesskey="j" id="start19"></a>1) Are there any pros and cons for using a URN for a namespace URI?  It seems that most people use URLs but I feel like that adds to the confusion with people expecting that URL to have something there if you go to it with a web browser.

2) If it doesn't matter, is there documentation for the accepted conventions for a <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema_editor.html">schema namespace</a> URN?  Mine starts with the following.


&lt;?<a title="xml" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">xml</a> version=&quot;1.0&quot; <a title="encoding" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_other.html">encoding</a>=&quot;UTF-8&quot;?&gt;
&lt;<a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema_editor.html">xs:schema</a>
    xmlns:xs=&quot;http://www.<a title="w3" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/w3c/">w3</a>.org/2001/XMLSchema&quot;
    xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
    xmlns:ds=&quot;urn:publicid:xmlns:objecteffects-com:schema:dataset&quot;
    targetNamespace=&quot;urn:publicid:xmlns:objecteffects-com:schema:dataset&quot;
    xsi:schemaLocation=&quot;
        http://www.w3.org/2001/XMLSchema
        http://www.w3.org/2001/XMLSchema.xsd&quot;
    elementFormDefault=&quot;qualified&quot;
    version=&quot;1.0&quot;&gt;

    &lt;xs:element
        name=&quot;dataset&quot;
        type=&quot;ds:DatasetType&quot;
    /&gt;

Thanks
</pre>
<span id="received"><dfn>Received on</dfn> Monday, 18 January 2010 09:25:37 GMT</span>
</div>
]]></content></entry><entry><title>RE: Is this schema legal? </title><id>http://xsd.stylusstudio.com/2010Jan/post07001.htm</id><link rel="alternate" type="text/html" href="http://xsd.stylusstudio.com/2010Jan/post07001.htm" /><updated>2010-01-15T23:56:07Z</updated><content type="text/plain"><![CDATA[<pre id="body">
<a name="start17" accesskey="j" id="start17"></a>&gt; The <a title="schema" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema.html">schema</a> below has two definitions for the tag &quot;spice&quot;, one 
&gt; nested inside the other.  Is that allowed? 

Yes.
&gt; 
&gt; And, could someone point me at something that answers this 
&gt; question.  I tried searching the <a title="XML Schema specs" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/w3c/schema0/_index.htm">XML Schema specs</a> at w3.org, 
&gt; but could not find anything definite. 

You won't find rules in the spec that say something is allowed. You'll only
find rules saying what isn't allowed. If there's no rule prohibiting it,
then it's allowed.

Regards,

<a title="Interview Michael Kay - W3C XML Member and Founder of Saxonica" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/michael_kay.html">Michael Kay</a>
http://www.saxonica.com/
http://twitter.com/michaelhkay 
</pre>
<span id="received"><dfn>Received on</dfn> Friday, 15 January 2010 23:56:36 GMT</span>
</div>
]]></content></entry><entry><title>Is this schema legal? </title><id>http://xsd.stylusstudio.com/2010Jan/post06001.htm</id><link rel="alternate" type="text/html" href="http://xsd.stylusstudio.com/2010Jan/post06001.htm" /><updated>2010-01-15T15:45:42Z</updated><content type="text/plain"><![CDATA[<pre id="body">
<a name="start16" accesskey="j" id="start16"></a>I think this is a <a title="schema" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema.html">schema</a> question, but it also might be an XML
namespaces question.

The schema below has two definitions for the tag &quot;spice&quot;, one
nested inside the other.  Is that allowed?  I would have thought
that you can have only one definition for a name within a given
namespace.  But, is it possible that it's OK in this case because
one is in a nested scope?

And, could someone point me at something that answers this
question.  I tried searching the <a title="XML Schema specs" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/w3c/schema0/_index.htm">XML Schema specs</a> at w3.org, but
could not find anything definite.  The closest thing I could find
was the following:

    A {scope} of global identifies element declarations available
    for use in content <a title="XML Schema Tutorial" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/videos/xmlschema1/xmlschema1.html">models throughout the schema</a>. Locally scoped
    declarations are available for use only within the complex type
    identified by the {scope} property. This property is *absent* in
    the case of declarations within named model groups: their scope is
    determined when they are used in the construction of complex type
    definitions. (http://www.w3.org/TR/xmlschema-1/#cElement_Declarations)

But, it's really saying something about *scope*, not about whether
whether a name must be unique within a namespace.

And, I'm asking this question because I need to know whether
generateDS.py (a <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml/editor/">tool</a> that that I work on and that generates
Python <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/jaxb.html">bindings</a>/classes from an XML schema) should handle
this situation.

Any guidance will be appreciated.

Here's the schema:

# ============================================
    &lt;?xml version=&quot;1.0&quot; <a title="encoding" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_other.html">encoding</a>=&quot;UTF-8&quot;?&gt;
    &lt;<a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema_editor.html">xs:schema</a>
      xmlns:xs=&quot;http://www.w3.org/2001/XMLSchema&quot;
      elementFormDefault=&quot;qualified&quot;
      attributeFormDefault=&quot;unqualified&quot;
      &gt;

      &lt;xs:element name=&quot;recipe&quot;&gt;
        &lt;xs:complexType&gt;
          &lt;xs:sequence&gt;
            &lt;xs:element name=&quot;flour&quot; type=&quot;flourType&quot; /&gt;
            &lt;xs:element name=&quot;spice&quot;&gt;
              &lt;xs:complexType&gt;
                &lt;xs:sequence&gt;
                  &lt;xs:element name=&quot;spice&quot;&gt;
                    &lt;xs:simpleType&gt;
                      &lt;xs:restriction base=&quot;xs:string&quot;&gt;
                        &lt;xs:length value=&quot;10&quot;/&gt;
                      &lt;/xs:restriction&gt;
                    &lt;/xs:simpleType&gt;
                  &lt;/xs:element&gt;
                &lt;/xs:sequence&gt;
              &lt;/xs:complexType&gt;
            &lt;/xs:element&gt;
          &lt;/xs:sequence&gt;
        &lt;/xs:complexType&gt;
      &lt;/xs:element&gt;

      &lt;xs:complexType name=&quot;flourType&quot;&gt;
        &lt;xs:sequence&gt;
          &lt;xs:element name=&quot;style&quot; type= &quot;xs:string&quot; /&gt;
          &lt;xs:element name=&quot;grade&quot; type= &quot;xs:integer&quot; /&gt;
        &lt;/xs:sequence&gt;
      &lt;/xs:complexType&gt;

    &lt;/xs:schema&gt;
# ============================================

- Dave

 -- 


Dave Kuhlman
http://www.rexx.com/~dkuhlman
</pre>
<span id="received"><dfn>Received on</dfn> Friday, 15 January 2010 23:46:16 GMT</span>
</div>
]]></content></entry><entry><title>Re: help with xsd </title><id>http://xsd.stylusstudio.com/2010Jan/post04001.htm</id><link rel="alternate" type="text/html" href="http://xsd.stylusstudio.com/2010Jan/post04001.htm" /><updated>2010-01-15T12:12:36Z</updated><content type="text/plain"><![CDATA[<pre id="body">
<a name="start14" accesskey="j" id="start14"></a>Apollo,

Our <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema.html">XSD</a> introduction at:

http://www.codalogic.com/lmx/xsd-<a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_feature_overview.html">overview</a>.html

may help if you are just beginning.

Pete Cordell
Codalogic Ltd
Interface <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">XML</a> to C++ the easy way using XML C++
<a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/jaxb.html">data binding</a> to <a title="convert" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/convert_to_xml.html">convert</a> XSD schemas to C++ classes.
Visit http://codalogic.com/lmx/ or http://www.xml2cpp.com 
for more info

----- Original Message From: &quot;apollo&quot;

&gt; 
&gt; Hi
&gt; 
&gt; I am a new-<a title="Using XML Schema to Model XML Data" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/videos/xmlschema1/xmlschema1.html">user of xsd</a>, and at the moment I got confusing with some stuff
&gt; Could someone please correct me if we can declare something like:
&gt; 
&gt; &lt;<a title="xsd:sequence" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema_editor.html">xsd:sequence</a>&gt;
&gt;   &lt;xsd:element name=&quot;var_name&quot; type=&quot;xsd:string&quot;/&gt;
&gt; 
&gt; &lt;!-- this means optional. which is similar to  
&gt; &lt;xsd:element name=&quot;var_name&quot; type=&quot;xsd:string&quot; use=&quot;optional&quot;/&gt; 
&gt; --&gt; 
&gt; 
&gt;   &lt;xsd:element name=&quot;var_value&quot; type=&quot;xsd:integer&quot; use=&quot;required&quot;/&gt;
&gt; &lt;/xsd:sequence&gt;
&gt; 
&gt; In some stuff, it is mentioned that  'use=&quot;optional/required&quot; ' can be 
&gt; added to attribute only. but elements are instances of attributes . Is 
&gt; this correct?
&gt; 
&gt; Thanks for reply
&gt; 
&gt; 
&gt; 
&gt;
</pre>
<span id="received"><dfn>Received on</dfn> Friday, 15 January 2010 12:13:24 GMT</span>
</div>
]]></content></entry><entry><title>xsd2dia or xsd2dot (graphviz) </title><id>http://xsd.stylusstudio.com/2010Jan/post03001.htm</id><link rel="alternate" type="text/html" href="http://xsd.stylusstudio.com/2010Jan/post03001.htm" /><updated>2010-01-15T10:42:19Z</updated><content type="text/plain"><![CDATA[<pre id="body">
<a name="start13" accesskey="j" id="start13"></a>Hi there,

 [Sorry if this slightly of topic, but I could not find better <a title="mailing
list" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/feeds/">mailing
list</a> for this question]

 I am looking for a <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml/editor/">tool</a> to <a title="convert" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/convert_to_xml.html">convert</a> an <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema.html">XSD</a> Schema to a dia type
output or a graphviz output (dot format). Does anyone know smothing like that ?

Thanks !
--
Mathieu
</pre>
<span id="received"><dfn>Received on</dfn> Friday, 15 January 2010 09:43:12 GMT</span>
</div>
]]></content></entry><entry><title>RE: help with xsd </title><id>http://xsd.stylusstudio.com/2010Jan/post02001.htm</id><link rel="alternate" type="text/html" href="http://xsd.stylusstudio.com/2010Jan/post02001.htm" /><updated>2010-01-15T09:29:33Z</updated><content type="text/plain"><![CDATA[<pre id="body">
<a name="start12" accesskey="j" id="start12"></a>&gt; 
&gt; I am a new-<a title="Using XML Schema to Model XML Data" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/videos/xmlschema1/xmlschema1.html">user of xsd</a>, and at the moment I got confusing 
&gt; with some stuff Could someone please correct me if we can 
&gt; declare something like:
&gt; 
&gt; &lt;<a title="xsd:sequence" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema_editor.html">xsd:sequence</a>&gt;
&gt;    &lt;xsd:element name=&quot;var_name&quot; type=&quot;xsd:string&quot;/&gt;
&gt; 
&gt; &lt;!-- this means optional. which is similar to &lt;xsd:element 
&gt; name=&quot;var_name&quot; type=&quot;xsd:string&quot; use=&quot;optional&quot;/&gt; 
&gt; --&gt; 
&gt; 
&gt;    &lt;xsd:element name=&quot;var_value&quot; type=&quot;xsd:integer&quot; 
&gt; use=&quot;required&quot;/&gt; &lt;/xsd:sequence&gt;
&gt; 
&gt; In some stuff, it is mentioned that  'use=&quot;optional/required&quot; 
&gt; ' can be added to attribute only. but elements are instances 
&gt; of attributes . Is this correct?
&gt; 

There are many differences in the way attributes and elements are described
in XML Schema (probably more differences than are strictly necessary).

With attributes, you use use=&quot;optional|required&quot; to indicate optionality.

With elements, you use minOccurs=&quot;0|1|....&quot;. The difference of course is
that elements can appear more than once, so it's possible to say things such
as minOccurs=&quot;4&quot;, though this rarely arises in practice.

Regards,

<a title="Interview Michael Kay - W3C XML Member and Founder of Saxonica" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/michael_kay.html">Michael Kay</a>
http://www.saxonica.com/
http://twitter.com/michaelhkay 
</pre>
<span id="received"><dfn>Received on</dfn> Friday, 15 January 2010 09:30:01 GMT</span>
</div>
]]></content></entry><entry><title>RE: Trying to create generic schema </title><id>http://xsd.stylusstudio.com/2010Jan/post01001.htm</id><link rel="alternate" type="text/html" href="http://xsd.stylusstudio.com/2010Jan/post01001.htm" /><updated>2010-01-15T09:25:37Z</updated><content type="text/plain"><![CDATA[<pre id="body">
<a name="start11" accesskey="j" id="start11"></a>There's no right answer to this. The generic coding imposes fewer
constraints on what can appear in the data, which is both good and bad.
Raising the level of abstraction in your design will tend to make the design
more versatile and more capable of dealing with requirements changing, at
the expense of being more complex and harder to work with. If you take it to
extremes you get to coding schemes like <a title="Convert EDI to XML" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/convert_edi_to_xml.html">HL7</a> that appear to have raised the
level of abstraction to a point where the information is totally
incomprehensible to everyone except a few high priests.
 
XML is extensible and it's not wrong to take advantage of the fact that the
tagset can be extended. It is wrong, however, to capture &quot;data&quot; (as distinct
from metadata) in the tag names. But it's a very fine line between
 
&lt;mobile-phone&gt;07778887777&lt;/mobile-phone&gt;
 
&lt;phone role=&quot;mobile&quot;&gt;07778887777&lt;/phone&gt;
 
&lt;attribute name=&quot;mobile-phone&quot; value=&quot;07778887777&quot;/&gt;
 
Your decision.
 
Regards,

<a title="Interview Michael Kay - W3C XML Member and Founder of Saxonica" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/michael_kay.html">Michael Kay</a>
http://www.saxonica.com/
http://twitter.com/michaelhkay 


  _____  

From: <a href="mailto:xmlschema-dev-request&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;?Subject=RE%3A%20Trying%20to%20create%20generic%20schema&amp;In-Reply-To=%253C7849339CF2A842C39A6629C4674B7857%40Sealion%253E&amp;References=%253C7849339CF2A842C39A6629C4674B7857%40Sealion%253E">xmlschema-dev-request&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;</a> [mailto:<a href="mailto:xmlschema-dev-request&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;?Subject=RE%3A%20Trying%20to%20create%20generic%20schema&amp;In-Reply-To=%253C7849339CF2A842C39A6629C4674B7857%40Sealion%253E&amp;References=%253C7849339CF2A842C39A6629C4674B7857%40Sealion%253E">xmlschema-dev-request&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;</a>] On
Behalf Of Jeff Faath
Sent: 14 January 2010 19:34
To: <a href="mailto:xmlschema-dev&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;?Subject=RE%3A%20Trying%20to%20create%20generic%20schema&amp;In-Reply-To=%253C7849339CF2A842C39A6629C4674B7857%40Sealion%253E&amp;References=%253C7849339CF2A842C39A6629C4674B7857%40Sealion%253E">xmlschema-dev&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;</a>
Subject: Trying to create generic <a title="schema" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema.html">schema</a>


Greetings,

I have a general question about creating a schema that is generic (from the
business point of view) vs non-generic.  I was wondering if I could get
advice from experts on the advantages or pitfalls of these two methods.  I'm
inexperienced with building XML documents so I don't have the foresight I
would like to have.  One method might look nicer now, but I'm worried it
might have issues with future processing and extendability needs.  The
question is probably best explained with an example.

We have multiple client applications that send data readings to a central
processor.  The context of the readings differ based on which application it
came from.  We anticipate having more applications in the future that send
more contextual data.  The schema is more complicated than this, but this
sums up the issue:

Generic

&lt;root&gt;
  &lt;<a title="data type" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/schema_aware.html">data type</a>=&quot;appA&quot;&gt;
    &lt;reading&gt;X&lt;/reading&gt;
    &lt;reading&gt;Y&lt;/reading&gt;
  &lt;/data&gt;
  &lt;data type=&quot;appB&quot;&gt;
    &lt;reading&gt;1&lt;/reading&gt;
    &lt;reading&gt;2&lt;/reading&gt;
  &lt;/data&gt;
&lt;root&gt;

Non-generic

&lt;root&gt;
  &lt;appAdata&gt;
    &lt;appAreading&gt;X&lt;/appAreading&gt;
    &lt;appAreading&gt;Y&lt;/appAreading&gt;
  &lt;/appAdata&gt;
  &lt;appBdata&gt;
    &lt;appBreading&gt;1&lt;/appBreading&gt;
    &lt;appBreading&gt;2&lt;/appBreading&gt;
  &lt;/appBdata&gt;
&lt;root&gt;

In the first example, the schema is much simpler with just three elements.
The type of data is determined by the 'type' attribute and that allows for
understanding the context of the reading values.  Having a new app installed
in the system would not require changing the schema.

In the second example, there are elements for each app and corresponding
readings.   The context is found in the explicit elements.  Adding a new app
would require adding a new element to the schema (and re-generating binding
classes).

The first example seems so much nicer, but I can't help but think there may
be some pitfalls to keeping it so clean.  The second example seems verbose,
but being explicit leaves no room for doubt when processing.  Might anyone
have some insight in how to go about this?  Is there some middle ground
between the two methods?

Regards,

JF
 
</pre>
<span id="received"><dfn>Received on</dfn> Friday, 15 January 2010 09:26:07 GMT</span>
</div>
]]></content></entry><entry><title>Re: Trying to create generic schema </title><id>http://xsd.stylusstudio.com/2010Jan/post05001.htm</id><link rel="alternate" type="text/html" href="http://xsd.stylusstudio.com/2010Jan/post05001.htm" /><updated>2010-01-15T05:29:20Z</updated><content type="text/plain"><![CDATA[<pre id="body">
<a name="start15" accesskey="j" id="start15"></a>
Pros and cons of both solutions are discussed in &quot;Strong- vs weak- typing for
<a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_feature_overview.html">features</a>&quot;:

https://www.seegrid.csiro.au/twiki/bin/view/AppSchemas/StrongWeakTyping
https://www.seegrid.csiro.au/twiki/bin/view/AppSchemas/StrongWeakTyping 

You may find these considerations helpful.


Regards,


KFF


Jeff Faath-3 wrote:
&gt; 
&gt; Greetings,
&gt; 
&gt; I have a general question about creating a <a title="schema" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema.html">schema</a> that is generic (from
&gt; the
&gt; business point of view) vs non-generic.  (...)
&gt; 
&gt; Regards,
&gt; 
&gt; JF
&gt; 
&gt; 

-- 
View this message in context: http://old.nabble.com/Trying-to-create-generic-schema-tp27174236p27175066.html
Sent from the <a title="w3" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/w3c/">w3</a>.org - <a title="xmlschema-dev" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://xsd.stylusstudio.com">xmlschema-dev</a> <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/feeds/">mailing list</a> archive at Nabble.com.
</pre>
<span id="received"><dfn>Received on</dfn> Friday, 15 January 2010 13:29:50 GMT</span>
</div>
]]></content></entry><entry><title>help with xsd </title><id>http://xsd.stylusstudio.com/2010Jan/post00001.htm</id><link rel="alternate" type="text/html" href="http://xsd.stylusstudio.com/2010Jan/post00001.htm" /><updated>2010-01-15T03:14:31Z</updated><content type="text/plain"><![CDATA[<pre id="body">
<a name="start10" accesskey="j" id="start10"></a>Hi

I am a new-<a title="Using XML Schema to Model XML Data" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/videos/xmlschema1/xmlschema1.html">user of xsd</a>, and at the moment I got confusing with some stuff
Could someone please correct me if we can declare something like:

&lt;<a title="xsd:sequence" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema_editor.html">xsd:sequence</a>&gt;
   &lt;xsd:element name=&quot;var_name&quot; type=&quot;xsd:string&quot;/&gt;

&lt;!-- this means optional. which is similar to  
&lt;xsd:element name=&quot;var_name&quot; type=&quot;xsd:string&quot; use=&quot;optional&quot;/&gt; 
--&gt; 

   &lt;xsd:element name=&quot;var_value&quot; type=&quot;xsd:integer&quot; use=&quot;required&quot;/&gt;
&lt;/xsd:sequence&gt;

In some stuff, it is mentioned that  'use=&quot;optional/required&quot; ' can be 
added to attribute only. but elements are instances of attributes . Is 
this correct?

Thanks for reply
</pre>
<span id="received"><dfn>Received on</dfn> Friday, 15 January 2010 08:58:01 GMT</span>
</div>
]]></content></entry><entry><title>Trying to create generic schema </title><id>http://xsd.stylusstudio.com/2010Jan/post09000.htm</id><link rel="alternate" type="text/html" href="http://xsd.stylusstudio.com/2010Jan/post09000.htm" /><updated>2010-01-14T13:34:19Z</updated><content type="text/plain"><![CDATA[<pre id="body">
<a name="start9" accesskey="j" id="start9"></a>Greetings,

I have a general question about creating a <a title="schema" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema.html">schema</a> that is generic (from the
business point of view) vs non-generic.  I was wondering if I could get
advice from experts on the advantages or pitfalls of these two methods.  I'm
inexperienced with building <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">XML</a> documents so I don't have the foresight I
would like to have.  One method might look nicer now, but I'm worried it
might have issues with future processing and extendability needs.  The
question is probably best explained with an example.

We have multiple client applications that send data readings to a central
processor.  The context of the readings differ based on which application it
came from.  We anticipate having more applications in the future that send
more contextual data.  The schema is more complicated than this, but this
sums up the issue:

Generic

&lt;root&gt;
  &lt;<a title="data type" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/schema_aware.html">data type</a>=&quot;appA&quot;&gt;
    &lt;reading&gt;X&lt;/reading&gt;
    &lt;reading&gt;Y&lt;/reading&gt;
  &lt;/data&gt;
  &lt;data type=&quot;appB&quot;&gt;
    &lt;reading&gt;1&lt;/reading&gt;
    &lt;reading&gt;2&lt;/reading&gt;
  &lt;/data&gt;
&lt;root&gt;

Non-generic

&lt;root&gt;
  &lt;appAdata&gt;
    &lt;appAreading&gt;X&lt;/appAreading&gt;
    &lt;appAreading&gt;Y&lt;/appAreading&gt;
  &lt;/appAdata&gt;
  &lt;appBdata&gt;
    &lt;appBreading&gt;1&lt;/appBreading&gt;
    &lt;appBreading&gt;2&lt;/appBreading&gt;
  &lt;/appBdata&gt;
&lt;root&gt;

In the first example, the schema is much simpler with just three elements.
The type of data is determined by the 'type' attribute and that allows for
understanding the context of the reading values.  Having a new app installed
in the system would not require changing the schema.

In the second example, there are elements for each app and corresponding
readings.   The context is found in the explicit elements.  Adding a new app
would require adding a new element to the schema (and re-generating <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/jaxb.html">binding</a>
classes).

The first example seems so much nicer, but I can't help but think there may
be some pitfalls to keeping it so clean.  The second example seems verbose,
but being explicit leaves no room for doubt when processing.  Might anyone
have some insight in how to go about this?  Is there some middle ground
between the two methods?

Regards,

JF
</pre>
<span id="received"><dfn>Received on</dfn> Friday, 15 January 2010 08:58:00 GMT</span>
</div>
]]></content></entry><entry><title>RE: Extending &amp;quot;choice&amp;quot; model group in a xsd schema </title><id>http://xsd.stylusstudio.com/2010Jan/post08000.htm</id><link rel="alternate" type="text/html" href="http://xsd.stylusstudio.com/2010Jan/post08000.htm" /><updated>2010-01-13T01:24:58Z</updated><content type="text/plain"><![CDATA[<pre id="body">
<a name="start8" accesskey="j" id="start8"></a>

<a title="Interview Michael Kay - W3C XML Member and Founder of Saxonica" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/michael_kay.html">Michael Kay</a> wrote:
&gt; 
&gt; 
&gt; Derivation by extension allows you to create a type that allows the
&gt; original
&gt; content, with new content added at the end. It doesn't allow any other
&gt; modification that produces content models which the original type won't
&gt; accept.
&gt; 

That's exactly the situation i am into, now. I am trying to extend an
already published (3rd party) <a title="xsd" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema.html">xsd</a>. And one of the difficulties is trying to
extend it in such a way that the new order makes sense. Not easy to achieve
for the reason you mentioned.

To overcome this, i was thinking of trying to do a &quot;redefine&quot; of the
element. But then again, apart from other rules, redefinition needs to be an
&quot;extension&quot; (or restriction) of the original. 

Later down this mail <a title="discussion" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/SSDN/default.asp">discussion</a>, there's a suggestion of using named model
group for creating a composite element instead of going for inheritance. But
that would require the original xsd to be composed of (reusable) named model
groups.
 
-- 
View this message in context: http://old.nabble.com/Extending-%22choice%22-model-group-in-a-xsd-schema-tp26967149p27141856.html
Sent from the w3.org - <a title="xmlschema-dev" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://xsd.stylusstudio.com">xmlschema-dev</a> <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/feeds/">mailing list</a> archive at Nabble.com.
</pre>
<span id="received"><dfn>Received on</dfn> Wednesday, 13 January 2010 09:25:26 GMT</span>
</div>
]]></content></entry><entry><title>Re: Extending &amp;quot;choice&amp;quot; model group in a xsd schema </title><id>http://xsd.stylusstudio.com/2010Jan/post07000.htm</id><link rel="alternate" type="text/html" href="http://xsd.stylusstudio.com/2010Jan/post07000.htm" /><updated>2010-01-13T01:17:59Z</updated><content type="text/plain"><![CDATA[<pre id="body">
<a name="start7" accesskey="j" id="start7"></a>

Kevin Braun wrote:
&gt; 
&gt; On 12/28/2009 9:28 AM, Jaikiran Pai wrote:
&gt;&gt; (red | blue)* (dark-red | dark-blue)*
&gt; 
&gt; What you actually have is:
&gt;   (red | blue)+ (dark-red | dark-blue)+
&gt; 
&gt; Your choice groups don't have minOccurs=0. 
&gt; 
Hmm, i apparently misunderstood the cardinality of &quot;choice&quot;. I was referring
to this article
http://www.<a title="Oracle Tools" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/oracle.html">oracle</a>.com/technology/pub/articles/srivastava_structures.html
which says:

&quot; Choice - (a | b)* - means that from the set of child elements declared
within the choice model group exactly one element must occur in the
corresponding <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">XML</a>-instance. The cardinality of a choice model group can
range from 0 to unbounded. A choice model group can futher contain a
sequence or a choice model group recursively.&quot; 

It's the (a | b) * which misled me.



Kevin Braun wrote:
&gt; 
&gt; If you are after (red | blue | dark-red | dark-blue)+, you aren't going 
&gt; to achieve it the way you are going.  <a title="Walmsley" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/priscilla_walmsley.html">Walmsley</a> suggests using 
&gt; substitution groups to extend choice groups (see 19.5.2 Extensions for 
&gt; Choice Groups, in <a title="XML Schema Tutorial" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/videos/xmlschema1/xmlschema1.html">Definitive XML Schema</a>).  You might take a look at that 
&gt; approach and see if it meets your needs.
&gt; 
Thanks Kevin, looking forward to get a copy of that one.

-- 
View this message in context: http://old.nabble.com/Extending-%22choice%22-model-group-in-a-xsd-schema-tp26967149p27141748.html
Sent from the <a title="w3" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/w3c/">w3</a>.org - <a title="xmlschema-dev" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://xsd.stylusstudio.com">xmlschema-dev</a> <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/feeds/">mailing list</a> archive at Nabble.com.
</pre>
<span id="received"><dfn>Received on</dfn> Wednesday, 13 January 2010 09:18:28 GMT</span>
</div>
]]></content></entry><entry><title>RE: Extending &amp;quot;choice&amp;quot; model group in a xsd schema </title><id>http://xsd.stylusstudio.com/2010Jan/post06000.htm</id><link rel="alternate" type="text/html" href="http://xsd.stylusstudio.com/2010Jan/post06000.htm" /><updated>2010-01-11T09:17:42Z</updated><content type="text/plain"><![CDATA[<pre id="body">
<a name="start6" accesskey="j" id="start6"></a>Of course <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema.html">XSD</a> also supports the OO 'composition' pattern, using named model
groups. 
Many people prefer this to multiple-inheritance to achieve some of the same
outcomes.  


--------------------------------------------------------
Simon Cox

European Commission, Joint Research Centre, 
Institute for Environment and Sustainability, 
Spatial Data Infrastructures Unit, TP 262 
Via E. Fermi, 2749, I-21027 Ispra (VA), Italy 
Tel: +39 0332 78 3652
Fax: +39 0332 78 6325
mailto:simon.cox@j... 
http://ies.jrc.ec.europa.eu/simon-cox 

SDI Unit: http://sdi.jrc.ec.europa.eu/ 
IES Institute: http://ies.jrc.ec.europa.eu/
JRC: http://www.jrc.ec.europa.eu/
--------------------------------------------------------

-----Original Message-----
From: <a href="mailto:xmlschema-dev-request&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;?Subject=RE%3A%20Extending%20%22choice%22%20model%20group%20in%20a%20xsd%20schema&amp;In-Reply-To=%253C123B69140701474B8FDBBFF730545BA4%40H07.jrc.it%253E&amp;References=%253C123B69140701474B8FDBBFF730545BA4%40H07.jrc.it%253E">xmlschema-dev-request&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;</a> [mailto:<a href="mailto:xmlschema-dev-request&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;?Subject=RE%3A%20Extending%20%22choice%22%20model%20group%20in%20a%20xsd%20schema&amp;In-Reply-To=%253C123B69140701474B8FDBBFF730545BA4%40H07.jrc.it%253E&amp;References=%253C123B69140701474B8FDBBFF730545BA4%40H07.jrc.it%253E">xmlschema-dev-request&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;</a>] On
Behalf Of <a href="mailto:noah_mendelsohn&#x40;&#0117;&#0115;&#0046;&#0105;&#0098;&#0109;&#0046;&#0099;&#0111;&#0109;?Subject=RE%3A%20Extending%20%22choice%22%20model%20group%20in%20a%20xsd%20schema&amp;In-Reply-To=%253C123B69140701474B8FDBBFF730545BA4%40H07.jrc.it%253E&amp;References=%253C123B69140701474B8FDBBFF730545BA4%40H07.jrc.it%253E">noah_mendelsohn&#x40;&#0117;&#0115;&#0046;&#0105;&#0098;&#0109;&#0046;&#0099;&#0111;&#0109;</a>
Sent: Friday, 8 January 2010 16:51
To: <a title="Interview Michael Kay - W3C XML Member and Founder of Saxonica" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/michael_kay.html">Michael Kay</a>
Cc: 'Henry S. Thompson'; 'Jaikiran Pai'; <a href="mailto:xmlschema-dev&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;?Subject=RE%3A%20Extending%20%22choice%22%20model%20group%20in%20a%20xsd%20schema&amp;In-Reply-To=%253C123B69140701474B8FDBBFF730545BA4%40H07.jrc.it%253E&amp;References=%253C123B69140701474B8FDBBFF730545BA4%40H07.jrc.it%253E">xmlschema-dev&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;</a>
Subject: RE: Extending &quot;choice&quot; <a title="model group in a xsd schema" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/videos/xmlschema1/xmlschema1.html">model group in a xsd schema</a>

Michael Kay writes:

&gt; The odd thing though is that the OO languages I'm familiar withtreat 
&gt; the fields/methods on a class as a set rather than a sequence, and a
subclass
&gt; can add members to this set; so they don't have any kind of 
&gt; user-visible constraint like the one in XSD that says the additions 
&gt; have to be at the end of the sequence.

Ah, you youngsters.  In C++ it's pretty much a given that methods are mapped
to vtbls in a predictable order, or at least that's my impression. 
More to the point, the order of mapping of structure (and thus class) fields
is also significant.  Both of these orderings become part of the binary
interface for C++ objects on any given platform, as different compilations
of header files with references to the same classes need to get consistent
vtbl offsets. 

Then again, C++ is arguably irrelevant to the XML <a title="discussion" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/SSDN/default.asp">discussion</a> precisely
because it does support multiple inheritance, with somewhat horrendous
implications for those vtbls under the covers;  that multiple inheritance
has no good analog in xsd:extension anyway, as far as I can see.  I agree
that most widely <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/deployment/">deployed</a> scripting languages, as well as Java-class
languages tend to do name-based resolution at runtime, and in that sense
treat the members as sets.

Noah


--------------------------------------
Noah Mendelsohn
IBM Corporation
One Rogers Street
Cambridge, MA 02142
1-617-693-4036
--------------------------------------








&quot;Michael Kay&quot; &lt;<a href="mailto:mike&#x40;&#0115;&#0097;&#0120;&#0111;&#0110;&#0105;&#0099;&#0097;&#0046;&#0099;&#0111;&#0109;?Subject=RE%3A%20Extending%20%22choice%22%20model%20group%20in%20a%20xsd%20schema&amp;In-Reply-To=%253C123B69140701474B8FDBBFF730545BA4%40H07.jrc.it%253E&amp;References=%253C123B69140701474B8FDBBFF730545BA4%40H07.jrc.it%253E">mike&#x40;&#0115;&#0097;&#0120;&#0111;&#0110;&#0105;&#0099;&#0097;&#0046;&#0099;&#0111;&#0109;</a>&gt;
01/08/2010 10:35 AM
 
        To:     &lt;<a href="mailto:noah_mendelsohn&#x40;&#0117;&#0115;&#0046;&#0105;&#0098;&#0109;&#0046;&#0099;&#0111;&#0109;?Subject=RE%3A%20Extending%20%22choice%22%20model%20group%20in%20a%20xsd%20schema&amp;In-Reply-To=%253C123B69140701474B8FDBBFF730545BA4%40H07.jrc.it%253E&amp;References=%253C123B69140701474B8FDBBFF730545BA4%40H07.jrc.it%253E">noah_mendelsohn&#x40;&#0117;&#0115;&#0046;&#0105;&#0098;&#0109;&#0046;&#0099;&#0111;&#0109;</a>&gt;, &quot;'Henry S. Thompson'&quot; 
&lt;<a href="mailto:ht&#x40;&#0105;&#0110;&#0102;&#0046;&#0101;&#0100;&#0046;&#0097;&#0099;&#0046;&#0117;&#0107;?Subject=RE%3A%20Extending%20%22choice%22%20model%20group%20in%20a%20xsd%20schema&amp;In-Reply-To=%253C123B69140701474B8FDBBFF730545BA4%40H07.jrc.it%253E&amp;References=%253C123B69140701474B8FDBBFF730545BA4%40H07.jrc.it%253E">ht&#x40;&#0105;&#0110;&#0102;&#0046;&#0101;&#0100;&#0046;&#0097;&#0099;&#0046;&#0117;&#0107;</a>&gt;
        cc:     &quot;'Jaikiran Pai'&quot; &lt;<a href="mailto:jai_forums2005&#x40;&#0121;&#0097;&#0104;&#0111;&#0111;&#0046;&#0099;&#0111;&#0046;&#0105;&#0110;?Subject=RE%3A%20Extending%20%22choice%22%20model%20group%20in%20a%20xsd%20schema&amp;In-Reply-To=%253C123B69140701474B8FDBBFF730545BA4%40H07.jrc.it%253E&amp;References=%253C123B69140701474B8FDBBFF730545BA4%40H07.jrc.it%253E">jai_forums2005&#x40;&#0121;&#0097;&#0104;&#0111;&#0111;&#0046;&#0099;&#0111;&#0046;&#0105;&#0110;</a>&gt;, 
&lt;<a href="mailto:xmlschema-dev&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;?Subject=RE%3A%20Extending%20%22choice%22%20model%20group%20in%20a%20xsd%20schema&amp;In-Reply-To=%253C123B69140701474B8FDBBFF730545BA4%40H07.jrc.it%253E&amp;References=%253C123B69140701474B8FDBBFF730545BA4%40H07.jrc.it%253E">xmlschema-dev&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;</a>&gt;
        Subject:        RE: Extending &quot;choice&quot; model group in a xsd schema


&gt; 
&gt; I think there was an intuition on the part of some members of 
&gt; the working group that extension would not only be similar in 
&gt; spirit to what is done for data inheritance in OO programming 
&gt; languages, but that it would facilitate serialization of such 
&gt; OO structures to XML. 

I thought it was probably something along those lines.

The odd thing though is that the OO languages I'm familiar with treat the
fields/methods on a class as a set rather than a sequence, and a subclass
can add members to this set; so they don't have any kind of user-visible
constraint like the one in XSD that says the additions have to be at the 
end
of the sequence.

Regards,

Michael Kay
http://www.saxonica.com/
http://twitter.com/michaelhkay 
</pre>
<span id="received"><dfn>Received on</dfn> Monday, 11 January 2010 08:18:43 GMT</span>
</div>
]]></content></entry><entry><title>Re: Extending &amp;quot;choice&amp;quot; model group in a xsd schema </title><id>http://xsd.stylusstudio.com/2010Jan/post05000.htm</id><link rel="alternate" type="text/html" href="http://xsd.stylusstudio.com/2010Jan/post05000.htm" /><updated>2010-01-08T22:14:32Z</updated><content type="text/plain"><![CDATA[<pre id="body">
<a name="start5" accesskey="j" id="start5"></a>On Fri, Jan 8, 2010 at 9:05 PM, <a title="Interview Michael Kay - W3C XML Member and Founder of Saxonica" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/michael_kay.html">Michael Kay</a> &lt;<a href="mailto:mike&#x40;&#0115;&#0097;&#0120;&#0111;&#0110;&#0105;&#0099;&#0097;&#0046;&#0099;&#0111;&#0109;?Subject=Re%3A%20Extending%20%22choice%22%20model%20group%20in%20a%20xsd%20schema&amp;In-Reply-To=%253C7870f82e1001080844p288cf758v82f187e87fe5a548%40mail.gmail.com%253E&amp;References=%253C7870f82e1001080844p288cf758v82f187e87fe5a548%40mail.gmail.com%253E">mike&#x40;&#0115;&#0097;&#0120;&#0111;&#0110;&#0105;&#0099;&#0097;&#0046;&#0099;&#0111;&#0109;</a>&gt; wrote:
&gt; The odd thing though is that the OO languages I'm familiar with treat the
&gt; fields/methods on a class as a set rather than a sequence, and a subclass
&gt; can add members to this set; so they don't have any kind of user-visible
&gt; constraint like the one in <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema.html">XSD</a> that says the additions have to be at the end
&gt; of the sequence.

I'm not sure, if comparing unordered fields/methods of a OO class to
say a XSD sequence, is the right thing to do. My experience with OO
languages, convinces me that unordered fields/methods is the right
design for OO languages. Giving order to fields/methods in an OO
program doesn't look right to me (because when the object's consumer
invokes an object's methods, order of methods or says fields, is not
significant -- or to say, is not required from a OO system).

Whereas, ordering (say the element order) is an important requirement
in XML documents.


-- 
Regards,
Mukul Gandhi
</pre>
<span id="received"><dfn>Received on</dfn> Friday,  8 January 2010 16:52:55 GMT</span>
</div>
]]></content></entry><entry><title>RE: Extending &amp;quot;choice&amp;quot; model group in a xsd schema </title><id>http://xsd.stylusstudio.com/2010Jan/post03000.htm</id><link rel="alternate" type="text/html" href="http://xsd.stylusstudio.com/2010Jan/post03000.htm" /><updated>2010-01-08T15:35:07Z</updated><content type="text/plain"><![CDATA[<pre id="body">
<a name="start3" accesskey="j" id="start3"></a>&gt; 
&gt; I think there was an intuition on the part of some members of 
&gt; the working group that extension would not only be similar in 
&gt; spirit to what is done for data inheritance in OO programming 
&gt; languages, but that it would facilitate serialization of such 
&gt; OO structures to <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">XML</a>.  

I thought it was probably something along those lines.

The odd thing though is that the OO languages I'm familiar with treat the
fields/methods on a class as a set rather than a sequence, and a subclass
can add members to this set; so they don't have any kind of user-visible
constraint like the one in <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema.html">XSD</a> that says the additions have to be at the end
of the sequence.

Regards,

<a title="Interview Michael Kay - W3C XML Member and Founder of Saxonica" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/michael_kay.html">Michael Kay</a>
http://www.saxonica.com/
http://twitter.com/michaelhkay 
</pre>
<span id="received"><dfn>Received on</dfn> Friday,  8 January 2010 15:35:43 GMT</span>
</div>
]]></content></entry><entry><title>Re: Extending &amp;quot;choice&amp;quot; model group in a xsd schema </title><id>http://xsd.stylusstudio.com/2010Jan/post01000.htm</id><link rel="alternate" type="text/html" href="http://xsd.stylusstudio.com/2010Jan/post01000.htm" /><updated>2010-01-08T13:47:50Z</updated><content type="text/plain"><![CDATA[<pre id="body">
<a name="start1" accesskey="j" id="start1"></a>-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

<a title="Interview Michael Kay - W3C XML Member and Founder of Saxonica" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/michael_kay.html">Michael Kay</a> writes:

&gt; I've never been quite sure whether there is any theoretical justification
&gt; for allowing this kind of extension of a content model and no other kind,
&gt; but that's what the spec does. I assume it's by analogy with object-oriented
&gt; inheritance which allows a subtype to have additional properties that were
&gt; not present in the supertype.

Yes.  The parallel with OO design was intentional, with the idea being
that just as many OO implementations handle type derivation in such a
way that a stack frame for an instance of a derived type is the
concatenation of a stack frame for its base type with extra slots for
additional local variable, so in <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema.html">XSD</a> an instance of an extension-derived
type is a concatenation of an instance of the base type with
additional elements as allowed by the derived type.

This is sometimes referred to as the &quot;prefix invariant&quot;, in contrast
with the &quot;subsumption invariant&quot; associated with derivation by restriction.

ht
- -- 
       Henry S. Thompson, School of Informatics, University of Edinburgh
                         Half-time member of W3C Team
      10 Crichton Street, Edinburgh EH8 9AB, SCOTLAND -- (44) 131 650-4440
                Fax: (44) 131 651-1426, e-mail: <a href="mailto:ht&#x40;&#0105;&#0110;&#0102;&#0046;&#0101;&#0100;&#0046;&#0097;&#0099;&#0046;&#0117;&#0107;?Subject=Re%3A%20Extending%20%22choice%22%20model%20group%20in%20a%20xsd%20schema&amp;In-Reply-To=%253Cf5bpr5kemih.fsf%40calexico.inf.ed.ac.uk%253E&amp;References=%253Cf5bpr5kemih.fsf%40calexico.inf.ed.ac.uk%253E">ht&#x40;&#0105;&#0110;&#0102;&#0046;&#0101;&#0100;&#0046;&#0097;&#0099;&#0046;&#0117;&#0107;</a>
                       URL: http://www.ltg.ed.ac.uk/~ht/
[mail really from me _always_ has this .sig -- mail without it is forged spam]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)

iD8DBQFLRzeGkjnJixAXWBoRAvLxAJ9zVj7P1/CSC5V/gwrhNn0TDbGZKgCcCUcR
RxPMZtBSqh3gvagnNhwkFJ0=
=jBxa
-----END PGP SIGNATURE-----
</pre>
<span id="received"><dfn>Received on</dfn> Friday,  8 January 2010 13:48:19 GMT</span>
</div>
]]></content></entry><entry><title>RE: Extending &amp;quot;choice&amp;quot; model group in a xsd schema </title><id>http://xsd.stylusstudio.com/2010Jan/post04000.htm</id><link rel="alternate" type="text/html" href="http://xsd.stylusstudio.com/2010Jan/post04000.htm" /><updated>2010-01-08T10:50:32Z</updated><content type="text/plain"><![CDATA[<pre id="body">
<a name="start4" accesskey="j" id="start4"></a><a title="Interview Michael Kay - W3C XML Member and Founder of Saxonica" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/michael_kay.html">Michael Kay</a> writes:

&gt; The odd thing though is that the OO languages I'm familiar withtreat the
&gt; fields/methods on a class as a set rather than a sequence, and a 
subclass
&gt; can add members to this set; so they don't have any kind of user-visible
&gt; constraint like the one in <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema.html">XSD</a> that says the additions have to 
&gt; be at the end
&gt; of the sequence.

Ah, you youngsters.  In C++ it's pretty much a given that methods are 
mapped to vtbls in a predictable order, or at least that's my impression. 
More to the point, the order of mapping of structure (and thus class) 
fields is also significant.  Both of these orderings become part of the 
binary interface for C++ objects on any given platform, as different 
compilations of header files with references to the same classes need to 
get consistent vtbl offsets. 

Then again, C++ is arguably irrelevant to the XML <a title="discussion" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/SSDN/default.asp">discussion</a> precisely 
because it does support multiple inheritance, with somewhat horrendous 
implications for those vtbls under the covers;  that multiple inheritance 
has no good analog in xsd:extension anyway, as far as I can see.  I agree 
that most widely <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/deployment/">deployed</a> scripting languages, as well as <a title="Java" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/configure_jre.html">Java</a>-class 
languages tend to do name-based <a title="resolution" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/new_years_resolutions.html">resolution</a> at runtime, and in that sense 
treat the members as sets.

Noah


--------------------------------------
Noah Mendelsohn 
IBM Corporation
One Rogers Street
Cambridge, MA 02142
1-617-693-4036
--------------------------------------








&quot;Michael Kay&quot; &lt;<a href="mailto:mike&#x40;&#0115;&#0097;&#0120;&#0111;&#0110;&#0105;&#0099;&#0097;&#0046;&#0099;&#0111;&#0109;?Subject=RE%3A%20Extending%20%22choice%22%20model%20group%20in%20a%20xsd%20schema&amp;In-Reply-To=%253COFB5E33230.37308244-ON852576A5.00568833-852576A5.00570754%40lotus.com%253E&amp;References=%253COFB5E33230.37308244-ON852576A5.00568833-852576A5.00570754%40lotus.com%253E">mike&#x40;&#0115;&#0097;&#0120;&#0111;&#0110;&#0105;&#0099;&#0097;&#0046;&#0099;&#0111;&#0109;</a>&gt;
01/08/2010 10:35 AM
 
        To:     &lt;<a href="mailto:noah_mendelsohn&#x40;&#0117;&#0115;&#0046;&#0105;&#0098;&#0109;&#0046;&#0099;&#0111;&#0109;?Subject=RE%3A%20Extending%20%22choice%22%20model%20group%20in%20a%20xsd%20schema&amp;In-Reply-To=%253COFB5E33230.37308244-ON852576A5.00568833-852576A5.00570754%40lotus.com%253E&amp;References=%253COFB5E33230.37308244-ON852576A5.00568833-852576A5.00570754%40lotus.com%253E">noah_mendelsohn&#x40;&#0117;&#0115;&#0046;&#0105;&#0098;&#0109;&#0046;&#0099;&#0111;&#0109;</a>&gt;, &quot;'Henry S. Thompson'&quot; 
&lt;<a href="mailto:ht&#x40;&#0105;&#0110;&#0102;&#0046;&#0101;&#0100;&#0046;&#0097;&#0099;&#0046;&#0117;&#0107;?Subject=RE%3A%20Extending%20%22choice%22%20model%20group%20in%20a%20xsd%20schema&amp;In-Reply-To=%253COFB5E33230.37308244-ON852576A5.00568833-852576A5.00570754%40lotus.com%253E&amp;References=%253COFB5E33230.37308244-ON852576A5.00568833-852576A5.00570754%40lotus.com%253E">ht&#x40;&#0105;&#0110;&#0102;&#0046;&#0101;&#0100;&#0046;&#0097;&#0099;&#0046;&#0117;&#0107;</a>&gt;
        cc:     &quot;'Jaikiran Pai'&quot; &lt;<a href="mailto:jai_forums2005&#x40;&#0121;&#0097;&#0104;&#0111;&#0111;&#0046;&#0099;&#0111;&#0046;&#0105;&#0110;?Subject=RE%3A%20Extending%20%22choice%22%20model%20group%20in%20a%20xsd%20schema&amp;In-Reply-To=%253COFB5E33230.37308244-ON852576A5.00568833-852576A5.00570754%40lotus.com%253E&amp;References=%253COFB5E33230.37308244-ON852576A5.00568833-852576A5.00570754%40lotus.com%253E">jai_forums2005&#x40;&#0121;&#0097;&#0104;&#0111;&#0111;&#0046;&#0099;&#0111;&#0046;&#0105;&#0110;</a>&gt;, 
&lt;<a href="mailto:xmlschema-dev&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;?Subject=RE%3A%20Extending%20%22choice%22%20model%20group%20in%20a%20xsd%20schema&amp;In-Reply-To=%253COFB5E33230.37308244-ON852576A5.00568833-852576A5.00570754%40lotus.com%253E&amp;References=%253COFB5E33230.37308244-ON852576A5.00568833-852576A5.00570754%40lotus.com%253E">xmlschema-dev&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;</a>&gt;
        Subject:        RE: Extending &quot;choice&quot; model group in a xsd schema


&gt; 
&gt; I think there was an intuition on the part of some members of 
&gt; the working group that extension would not only be similar in 
&gt; spirit to what is done for data inheritance in OO programming 
&gt; languages, but that it would facilitate serialization of such 
&gt; OO structures to XML. 

I thought it was probably something along those lines.

The odd thing though is that the OO languages I'm familiar with treat the
fields/methods on a class as a set rather than a sequence, and a subclass
can add members to this set; so they don't have any kind of user-visible
constraint like the one in XSD that says the additions have to be at the 
end
of the sequence.

Regards,

Michael Kay
http://www.saxonica.com/
http://twitter.com/michaelhkay 
</pre>
<span id="received"><dfn>Received on</dfn> Friday,  8 January 2010 15:51:21 GMT</span>
</div>
]]></content></entry><entry><title>Re: Extending &amp;quot;choice&amp;quot; model group in a xsd schema </title><id>http://xsd.stylusstudio.com/2010Jan/post02000.htm</id><link rel="alternate" type="text/html" href="http://xsd.stylusstudio.com/2010Jan/post02000.htm" /><updated>2010-01-08T10:20:01Z</updated><content type="text/plain"><![CDATA[<pre id="body">
<a name="start2" accesskey="j" id="start2"></a>I think there was an intuition on the part of some members of the working 
group that extension would not only be similar in spirit to what is done 
for data inheritance in OO programming languages, but that it would 
facilitate serialization of such OO structures to <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">XML</a>.  I'm not saying I 
was entirely convinced of those arguments, in part because there are so 
many subtleties in what different languages really do (e.g. multiple 
inheritance in C++), but I think it's fair to say that this was a <a title="use case" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery/use_cases.html">use case</a> 
some WG members had in mind.

Noah

--------------------------------------
Noah Mendelsohn 
IBM Corporation
One Rogers Street
Cambridge, MA 02142
1-617-693-4036
--------------------------------------








<a href="mailto:ht&#x40;&#0105;&#0110;&#0102;&#0046;&#0101;&#0100;&#0046;&#0097;&#0099;&#0046;&#0117;&#0107;?Subject=Re%3A%20Extending%20%22choice%22%20model%20group%20in%20a%20xsd%20schema&amp;In-Reply-To=%253COF48405D79.740404BA-ON852576A5.00540BC0-852576A5.00543BEB%40lotus.com%253E&amp;References=%253COF48405D79.740404BA-ON852576A5.00540BC0-852576A5.00543BEB%40lotus.com%253E">ht&#x40;&#0105;&#0110;&#0102;&#0046;&#0101;&#0100;&#0046;&#0097;&#0099;&#0046;&#0117;&#0107;</a> (Henry S. Thompson)
Sent by: <a href="mailto:xmlschema-dev-request&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;?Subject=Re%3A%20Extending%20%22choice%22%20model%20group%20in%20a%20xsd%20schema&amp;In-Reply-To=%253COF48405D79.740404BA-ON852576A5.00540BC0-852576A5.00543BEB%40lotus.com%253E&amp;References=%253COF48405D79.740404BA-ON852576A5.00540BC0-852576A5.00543BEB%40lotus.com%253E">xmlschema-dev-request&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;</a>
01/08/2010 08:47 AM
 
        To:     &quot;<a title="Interview Michael Kay - W3C XML Member and Founder of Saxonica" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/michael_kay.html">Michael Kay</a>&quot; &lt;<a href="mailto:mike&#x40;&#0115;&#0097;&#0120;&#0111;&#0110;&#0105;&#0099;&#0097;&#0046;&#0099;&#0111;&#0109;?Subject=Re%3A%20Extending%20%22choice%22%20model%20group%20in%20a%20xsd%20schema&amp;In-Reply-To=%253COF48405D79.740404BA-ON852576A5.00540BC0-852576A5.00543BEB%40lotus.com%253E&amp;References=%253COF48405D79.740404BA-ON852576A5.00540BC0-852576A5.00543BEB%40lotus.com%253E">mike&#x40;&#0115;&#0097;&#0120;&#0111;&#0110;&#0105;&#0099;&#0097;&#0046;&#0099;&#0111;&#0109;</a>&gt;
        cc:     &quot;'Jaikiran Pai'&quot; &lt;<a href="mailto:jai_forums2005&#x40;&#0121;&#0097;&#0104;&#0111;&#0111;&#0046;&#0099;&#0111;&#0046;&#0105;&#0110;?Subject=Re%3A%20Extending%20%22choice%22%20model%20group%20in%20a%20xsd%20schema&amp;In-Reply-To=%253COF48405D79.740404BA-ON852576A5.00540BC0-852576A5.00543BEB%40lotus.com%253E&amp;References=%253COF48405D79.740404BA-ON852576A5.00540BC0-852576A5.00543BEB%40lotus.com%253E">jai_forums2005&#x40;&#0121;&#0097;&#0104;&#0111;&#0111;&#0046;&#0099;&#0111;&#0046;&#0105;&#0110;</a>&gt;, 
&lt;<a href="mailto:xmlschema-dev&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;?Subject=Re%3A%20Extending%20%22choice%22%20model%20group%20in%20a%20xsd%20schema&amp;In-Reply-To=%253COF48405D79.740404BA-ON852576A5.00540BC0-852576A5.00543BEB%40lotus.com%253E&amp;References=%253COF48405D79.740404BA-ON852576A5.00540BC0-852576A5.00543BEB%40lotus.com%253E">xmlschema-dev&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;</a>&gt;, (bcc: Noah Mendelsohn/Cambridge/IBM)
        Subject:        Re: Extending &quot;choice&quot; <a title="model group in a xsd schema" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/videos/xmlschema1/xmlschema1.html">model group in a xsd schema</a>


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Michael Kay writes:

&gt; I've never been quite sure whether there is any theoretical 
justification
&gt; for allowing this kind of extension of a content model and no other 
kind,
&gt; but that's what the spec does. I assume it's by analogy with 
object-oriented
&gt; inheritance which allows a subtype to have additional properties that 
were
&gt; not present in the supertype.

Yes.  The parallel with OO design was intentional, with the idea being
that just as many OO implementations handle type derivation in such a
way that a stack frame for an instance of a derived type is the
concatenation of a stack frame for its base type with extra slots for
additional local variable, so in XSD an instance of an extension-derived
type is a concatenation of an instance of the base type with
additional elements as allowed by the derived type.

This is sometimes referred to as the &quot;prefix invariant&quot;, in contrast
with the &quot;subsumption invariant&quot; associated with derivation by 
restriction.

ht
- -- 
       Henry S. Thompson, School of Informatics, University of Edinburgh
                         Half-time member of W3C Team
      10 Crichton Street, Edinburgh EH8 9AB, SCOTLAND -- (44) 131 650-4440
                Fax: (44) 131 651-1426, e-mail: <a href="mailto:ht&#x40;&#0105;&#0110;&#0102;&#0046;&#0101;&#0100;&#0046;&#0097;&#0099;&#0046;&#0117;&#0107;?Subject=Re%3A%20Extending%20%22choice%22%20model%20group%20in%20a%20xsd%20schema&amp;In-Reply-To=%253COF48405D79.740404BA-ON852576A5.00540BC0-852576A5.00543BEB%40lotus.com%253E&amp;References=%253COF48405D79.740404BA-ON852576A5.00540BC0-852576A5.00543BEB%40lotus.com%253E">ht&#x40;&#0105;&#0110;&#0102;&#0046;&#0101;&#0100;&#0046;&#0097;&#0099;&#0046;&#0117;&#0107;</a>
                       URL: http://www.ltg.ed.ac.uk/~ht/
[mail really from me _always_ has this .sig -- mail without it is forged 
spam]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)

iD8DBQFLRzeGkjnJixAXWBoRAvLxAJ9zVj7P1/CSC5V/gwrhNn0TDbGZKgCcCUcR
RxPMZtBSqh3gvagnNhwkFJ0=
=jBxa
-----END PGP SIGNATURE-----
</pre>
<span id="received"><dfn>Received on</dfn> Friday,  8 January 2010 15:20:35 GMT</span>
</div>
]]></content></entry><entry><title>Announce: generateDS.py -- generate bindings </title><id>http://xsd.stylusstudio.com/2010Jan/post00000.htm</id><link rel="alternate" type="text/html" href="http://xsd.stylusstudio.com/2010Jan/post00000.htm" /><updated>2010-01-05T12:02:59Z</updated><content type="text/plain"><![CDATA[<pre id="body">
<a name="start0" accesskey="j" id="start0"></a>You may want to add generateDS.py to the list of <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml/editor/">tools</a> at
http://www.<a title="w3" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/w3c/">w3</a>.org/XML/<a title="Schema" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema.html">Schema</a>.

I've attached a description below.

Thanks.

- Dave

==================================================================

generateDS.py
===============

generateDS.py generates Python <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/jaxb.html">bindings</a> (data structures, class definitions)
from an <a title="XML Schema document" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema_editor.html">XML Schema document</a>.  These data structures represent the
elements in an XML instance document described by the XML Schema. 
generateDS.py also generates parsers (methods in the generated
class) that load an XML document into those data structures, export
methods that can be called to print out the XML instance document
or write it to a file, getter and setter methods, and other
support.  In addition, a separate file containing subclasses
(stubs) is optionally generated.  The user can add methods to the
subclasses in order to process the contents of an XML document.

For more information, see the documentation at:
http://www.rexx.com/~dkuhlman/generateDS.html.

A distribution package containing generateDS.py, documentation,
and support files is available here:

- http://pypi.python.org/pypi/generateDS/

- http://sourceforge.net/<a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_project.html">projects</a>/generateds/

==================================================================



-- 


Dave Kuhlman
http://www.rexx.com/~dkuhlman
</pre>
<span id="received"><dfn>Received on</dfn> Wednesday,  6 January 2010 08:01:48 GMT</span>
</div>
]]></content></entry><entry><title>Parallel deriving of components and containers using derivation by  restriction - consistency problem </title><id>http://xsd.stylusstudio.com/2009Dec/post01002.htm</id><link rel="alternate" type="text/html" href="http://xsd.stylusstudio.com/2009Dec/post01002.htm" /><updated>2009-12-31T03:49:18Z</updated><content type="text/plain"><![CDATA[<pre id="body">
<a name="start21" accesskey="j" id="start21"></a>
I have still problems with derivation by restriction (certainly I'm not the
first one).

Problem is concerned with concept of parallel deriving of components and
containers, like described in:
http://www.xfront.com/ElementHierarchy.html

I've tried to isolate the problem to minimal amount of code, which I'm
trying to explain below.

Let's start with elements and types <a title="An Introduction to XML Schema Development" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/videos/xmlschema1/xmlschema1.html">defined in base schema</a>, sys.xsd:

&lt;schema targetNamespace=&quot;http://www.org.com/SYS&quot;
xmlns:sys=&quot;http://www.org.com/SYS&quot;
    xmlns:xsd=&quot;http://www.<a title="w3" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/w3c/">w3</a>.org/2001/XMLSchema&quot;
xmlns=&quot;http://www.w3.org/2001/XMLSchema&quot;
    elementFormDefault=&quot;qualified&quot;&gt;
    
    &lt;element name=&quot;quantity&quot; type=&quot;sys:QuantityType&quot;/&gt;
    
    &lt;simpleType name=&quot;QuantityType&quot;&gt;
        &lt;restriction base=&quot;integer&quot;&gt;
            &lt;minInclusive value=&quot;0&quot;/&gt;
        &lt;/restriction&gt;
    &lt;/simpleType&gt;
    
    &lt;complexType name=&quot;BaseType11&quot;&gt;
        &lt;sequence&gt;
            &lt;element ref=&quot;sys:quantity&quot;/&gt;
        &lt;/sequence&gt;
    &lt;/complexType&gt;
    
    &lt;complexType name=&quot;BaseType0u&quot;&gt;
        &lt;sequence&gt;
            &lt;element ref=&quot;sys:quantity&quot; minOccurs=&quot;0&quot;
maxOccurs=&quot;unbounded&quot;/&gt;
        &lt;/sequence&gt;
    &lt;/complexType&gt;
    
&lt;/schema&gt;

There is simple element &quot;quantity&quot; which is used in two alternative
definitions of complex types: BaseType11 (with default values of minOccurs
and maxOccurs equal to &quot;1&quot;) and BaseType0u (with minOccurs=&quot;0&quot;
maxOccurs=&quot;unbounded&quot;).

Now I want to define some derived types in derived schema, app.xsd:

&lt;?xml version=&quot;1.0&quot; <a title="encoding" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_other.html">encoding</a>=&quot;UTF-8&quot;?&gt;
&lt;schema 
    targetNamespace=&quot;http://www.org.com/APP&quot;
    xmlns:app=&quot;http://www.org.com/APP&quot;
    xmlns:sys=&quot;http://www.org.com/SYS&quot; 
    xmlns:xsd=&quot;http://www.w3.org/2001/XMLSchema&quot; 
    xmlns=&quot;http://www.w3.org/2001/XMLSchema&quot; 
    elementFormDefault=&quot;qualified&quot;&gt;

    &lt;import namespace=&quot;http://www.org.com/SYS&quot; schemaLocation=&quot;sys.xsd&quot;/&gt;
    
    &lt;element name=&quot;restrictedQuantity&quot; type=&quot;app:RestrictedQuantityType&quot;
substitutionGroup=&quot;sys:quantity&quot;/&gt;
    
    &lt;simpleType name=&quot;RestrictedQuantityType&quot;&gt;
        &lt;restriction base=&quot;sys:QuantityType&quot;&gt;
            &lt;maxInclusive value=&quot;10&quot;/&gt;
        &lt;/restriction&gt;
    &lt;/simpleType&gt;
    
    &lt;complexType name=&quot;DerivedType11VALID&quot;&gt;
        &lt;complexContent&gt;
            &lt;restriction base=&quot;sys:BaseType11&quot;&gt;
                &lt;sequence&gt;
                    &lt;element ref=&quot;app:restrictedQuantity&quot;/&gt;
                &lt;/sequence&gt;
            &lt;/restriction&gt;
        &lt;/complexContent&gt;
    &lt;/complexType&gt;
    
    &lt;complexType name=&quot;DerivedType0uVALID&quot;&gt;
        &lt;complexContent&gt;
            &lt;restriction base=&quot;sys:BaseType0u&quot;&gt;
                &lt;sequence&gt;
                    &lt;element ref=&quot;app:restrictedQuantity&quot;/&gt;
                &lt;/sequence&gt;
            &lt;/restriction&gt;
        &lt;/complexContent&gt;
    &lt;/complexType&gt;
    
    &lt;complexType name=&quot;DerivedType0uINVALID&quot;&gt;
        &lt;complexContent&gt;
            &lt;restriction base=&quot;sys:BaseType0u&quot;&gt;
                &lt;sequence&gt;
                    &lt;element ref=&quot;app:restrictedQuantity&quot; minOccurs=&quot;0&quot;
maxOccurs=&quot;unbounded&quot;/&gt;
                &lt;/sequence&gt;
            &lt;/restriction&gt;
        &lt;/complexContent&gt;
    &lt;/complexType&gt;
    
    &lt;complexType name=&quot;DerivedType12VALID&quot;&gt;
        &lt;complexContent&gt;
            &lt;restriction base=&quot;sys:BaseType0u&quot;&gt;
                &lt;sequence&gt;
                    &lt;element ref=&quot;sys:quantity&quot; minOccurs=&quot;1&quot;
maxOccurs=&quot;2&quot;/&gt;
                &lt;/sequence&gt;
            &lt;/restriction&gt;
        &lt;/complexContent&gt;
    &lt;/complexType&gt;
    
&lt;/schema&gt;

Let's note that element app:restrictedQuantity is in substitution group of
sys:quantity.

Definition of DerivedType11VALID by restricting BaseType11 forcing it to use
app:restrictedQuantity in place of sys:quantity works fine. So far, so good.

Deriving from BaseType0u have some singularities, however.

Definition of DerivedType0uVALID is valid. But it forces two things at once:
using app:restrictedQuantity in place of sys:quantity AND requiring default
minOccurs=&quot;1&quot; maxOccurs=&quot;1&quot;.

When I want to relax this condition (to force app:restrictedQuantity, but to
allow for minOccurs=&quot;0&quot; maxOccurs=&quot;unbounded&quot; in target schema) it leads to
INVALID definition of DerivedType0uINVALID.

The only thing I can do while restricting occurence count is with definition
of DerivedType12VALID type, where original sys:quantity has to be referred
to make this construction valid.

So it seems that I can restrict element reference (but forcing its usage) OR
restrict usage count (but using original reference). I cannot redefine both.
Worse, when I'm restricting element reference, it is not possible even to
repeat original relaxed usage count.

The error messages are as follows:
Description: rcase-RecurseLax.2: There is not a complete functional mapping
between the particles.
URL: http://www.w3.org/TR/xmlschema-1/#rcase-RecurseLax

Description: derivation-ok-restriction.5.4.2: Error for type
'DerivedType0uINVALID'.  The particle of the type is not a valid restriction
of the particle of the base.
URL: http://www.w3.org/TR/xmlschema-1/#derivation-ok-restriction

Maybe it is possible to explain using elaborate definitions from
http://www.w3.org/TR/xmlschema-1, where I am wrong.

But my question tries to be more constructive:
- How can I change my definitions to achieve valid desired effect?

To anticipate fast responses, I've tried another method.
With single sys:quantity element inside BaseType, I can create BaseTypeMod
definition modified as follows:

    &lt;complexType name=&quot;BaseTypeMod&quot;&gt;
        &lt;sequence minOccurs=&quot;0&quot; maxOccurs=&quot;unbounded&quot;&gt;
            &lt;element ref=&quot;sys:quantity&quot;/&gt;
        &lt;/sequence&gt;
    &lt;/complexType&gt;
    
Now I can redefine both element reference and usage count:

    &lt;complexType name=&quot;DerivedTypeModVALID&quot;&gt;
        &lt;complexContent&gt;
            &lt;restriction base=&quot;sys:BaseTypeMod&quot;&gt;
                &lt;sequence minOccurs=&quot;1&quot; maxOccurs=&quot;2&quot;&gt;
                    &lt;element ref=&quot;app:restrictedQuantity&quot;/&gt;
                &lt;/sequence&gt;
            &lt;/restriction&gt;
        &lt;/complexContent&gt;
    &lt;/complexType&gt;
	
Moreover, I can effectively derive even from BaseType0u redefining usage
count but on sequence level, not on element level (seems to be strange that
I can EXTEND sequence usage when deriving by restriction):
    
    &lt;complexType name=&quot;DerivedType0uModVALID&quot;&gt;
        &lt;complexContent&gt;
            &lt;restriction base=&quot;sys:BaseType0u&quot;&gt;
                &lt;sequence minOccurs=&quot;1&quot; maxOccurs=&quot;2&quot;&gt;
                    &lt;element ref=&quot;app:restrictedQuantity&quot;/&gt;
                &lt;/sequence&gt;
            &lt;/restriction&gt;
        &lt;/complexContent&gt;
    &lt;/complexType&gt;

But in real life situations I have more than single element included in
definition of complex type. Each of them may have different requirements
about its usage count and different rules to be used when deriving. So this
construction (placing usage count on sequence level) is of limited usage.

So, my questions still remain:
- Are there any feasible constructions allowing for effective and flexible
derivation by restriction in presented case?
- If not, what is wrong:
	- XML schema stiffness and formality?
	- my expectations about its usage?

Happy New Year anyway!

-- 
View this message in context: http://old.nabble.com/Parallel-deriving-of-components-and-containers-using-derivation-by-restriction---consistency-problem-tp26977566p26977566.html
Sent from the w3.org - xmlschema-dev mailing list archive at Nabble.com.
</pre>
<span id="received"><dfn>Received on</dfn> Thursday, 31 December 2009 11:49:48 GMT</span>
</div>
]]></content></entry><entry><title>RE: Extending &amp;quot;choice&amp;quot; model group in a xsd schema </title><id>http://xsd.stylusstudio.com/2009Dec/post00002.htm</id><link rel="alternate" type="text/html" href="http://xsd.stylusstudio.com/2009Dec/post00002.htm" /><updated>2009-12-30T16:26:20Z</updated><content type="text/plain"><![CDATA[<pre id="body">
<a name="start20" accesskey="j" id="start20"></a>
Derivation by extension allows you to create a type that allows the original
content, with new content added at the end. It doesn't allow any other
modification that produces content models which the original type won't
accept.

I've never been quite sure whether there is any theoretical justification
for allowing this kind of extension of a content model and no other kind,
but that's what the spec does. I assume it's by analogy with object-oriented
inheritance which allows a subtype to have additional properties that were
not present in the supertype.

Regards,

<a title="Interview Michael Kay - W3C XML Member and Founder of Saxonica" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/michael_kay.html">Michael Kay</a>
http://www.saxonica.com/
http://twitter.com/michaelhkay  

&gt; -----Original Message-----
&gt; From: <a href="mailto:xmlschema-dev-request&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;?Subject=RE%3A%20Extending%20%22choice%22%20model%20group%20in%20a%20xsd%20schema&amp;In-Reply-To=%253C45FD70F4718A4F40B8CBAEC8DA9F5E4A%40Sealion%253E&amp;References=%253C45FD70F4718A4F40B8CBAEC8DA9F5E4A%40Sealion%253E">xmlschema-dev-request&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;</a> 
&gt; [mailto:<a href="mailto:xmlschema-dev-request&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;?Subject=RE%3A%20Extending%20%22choice%22%20model%20group%20in%20a%20xsd%20schema&amp;In-Reply-To=%253C45FD70F4718A4F40B8CBAEC8DA9F5E4A%40Sealion%253E&amp;References=%253C45FD70F4718A4F40B8CBAEC8DA9F5E4A%40Sealion%253E">xmlschema-dev-request&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;</a>] On Behalf Of Jaikiran Pai
&gt; Sent: 28 December 2009 14:29
&gt; To: <a href="mailto:xmlschema-dev&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;?Subject=RE%3A%20Extending%20%22choice%22%20model%20group%20in%20a%20xsd%20schema&amp;In-Reply-To=%253C45FD70F4718A4F40B8CBAEC8DA9F5E4A%40Sealion%253E&amp;References=%253C45FD70F4718A4F40B8CBAEC8DA9F5E4A%40Sealion%253E">xmlschema-dev&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;</a>
&gt; Subject: Extending &quot;choice&quot; <a title="model group in a xsd schema" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/videos/xmlschema1/xmlschema1.html">model group in a xsd schema</a>
&gt; 
&gt; Hello everyone,
&gt; 
&gt; I have been trying to &quot;extend&quot; a type which allows xsd:choice 
&gt; model group to add a couple of more allowed choice elements. 
&gt; Here's the original xsd:
&gt; 
&gt; &lt;?xml version=&quot;1.0&quot; <a title="encoding" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_other.html">encoding</a>=&quot;UTF-8&quot;?&gt;
&gt; &lt;<a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema_editor.html">xsd:schema</a> xmlns=&quot;http://www.w3.org/2001/XMLSchema&quot;
&gt;             targetNamespace=&quot;http://www.myapp.org/xml/ns/myapp&quot;
&gt;             xmlns:myapp=&quot;http://www.myapp.org/xml/ns/myapp&quot;
&gt;             xmlns:xsd=&quot;http://www.w3.org/2001/XMLSchema&quot;
&gt;             elementFormDefault=&quot;qualified&quot;
&gt;             attributeFormDefault=&quot;unqualified&quot;
&gt;             version=&quot;1.0&quot;&gt;
&gt; 
&gt;     &lt;xsd:element name=&quot;graphics&quot; type=&quot;graphicsType/&gt;
&gt; 
&gt;     &lt;xsd:complexType name=&quot;graphicsType&quot;&gt;
&gt;         &lt;xsd:sequence&gt;
&gt;             &lt;xsd:element name=&quot;colours&quot; type=&quot;coloursType&quot;/&gt;
&gt;         &lt;/xsd:sequence&gt;
&gt;     &lt;/xsd:complexType&gt;
&gt;     
&gt; 
&gt;     &lt;xsd:complexType name=&quot;coloursType&quot;&gt;
&gt;         &lt;xsd:choice maxOccurs=&quot;unbounded&quot;&gt;
&gt;               &lt;xsd:element name=&quot;red&quot;&gt;
&gt;             &lt;xsd:complexType /&gt;
&gt;         &lt;/xsd:elemen&gt;
&gt;         &lt;xsd:element name=&quot;blue&quot;&gt;
&gt;             &lt;xsd:complexType /&gt;
&gt;         &lt;/xsd:element&gt;
&gt;        &lt;/xsd:choice&gt;
&gt;     &lt;/xsd:complexType&gt;
&gt; &lt;/xsd:schema&gt;
&gt; 
&gt; 
&gt; The extended xsd is as follows: 
&gt; 
&gt; &lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&gt; &lt;xsd:schema xmlns=&quot;http://www.w3.org/2001/XMLSchema&quot;
&gt;             targetNamespace=&quot;http://www.myapp.org/xml/ns/myapp&quot;
&gt;             xmlns:myapp=&quot;http://www.myapp.org/xml/ns/myapp&quot;
&gt;             xmlns:xsd=&quot;http://www.w3.org/2001/XMLSchema&quot;
&gt;             elementFormDefault=&quot;qualified&quot;
&gt;             attributeFormDefault=&quot;unqualified&quot;
&gt;             version=&quot;1.0&quot;&gt;
&gt; 
&gt;     &lt;xsd:element name=&quot;extended-graphics&quot; 
&gt; type=&quot;extended-graphicsType/&gt;
&gt;     
&gt;     &lt;xsd:complexType name=&quot;extended-graphicsType&quot;&gt;
&gt;         &lt;xsd:extension base=&quot;graphicsType&quot;&gt;
&gt;             &lt;xsd:sequence&gt;
&gt;                 &lt;xsd:element name=&quot;brush&quot; type=&quot;xsd:string&quot;/&gt;
&gt;             &lt;/xsd:sequence&gt;
&gt;         &lt;/xsd:extension&gt;
&gt;     &lt;/xsd:complexType&gt;
&gt; 
&gt;     &lt;xsd:complexType name=&quot;more-coloursType&quot; &gt;
&gt;         &lt;xsd:extension base=&quot;coloursType&quot;&gt;
&gt;                 &lt;xsd:choice maxOccurs=&quot;unbounded&quot;&gt;
&gt;                       &lt;xsd:element name=&quot;dark-red&quot;&gt;
&gt;                     &lt;xsd:complexType /&gt;
&gt;                 &lt;/xsd:elemen&gt;
&gt;                 &lt;xsd:element name=&quot;dark-blue&quot;&gt;
&gt;                     &lt;xsd:complexType /&gt;
&gt;                 &lt;/xsd:element&gt;
&gt;                &lt;/xsd:choice&gt;
&gt;         &lt;/xsd:extension&gt;
&gt;     &lt;/xsd:complexType&gt;
&gt;         
&gt; &lt;/xsd:schema&gt;
&gt; 
&gt; So here i have a &quot;coloursType&quot; with a choice of &quot;red&quot; and 
&gt; &quot;blue&quot; and the extended &quot;more-coloursType&quot; has the additional 
&gt; &quot;dark-red&quot; and &quot;dark-blue&quot;. Then in my xml i am trying to do this:
&gt; 
&gt; &lt;extended-graphics xmlns=&quot;http://www.myapp.org/xml/ns/myapp&quot;
&gt;              xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
&gt;              xmlns:myapp=&quot;http://www.myapp.org/xml/ns/myapp&quot;&gt;
&gt; 
&gt;     &lt;colours xsi:type=&quot;more-coloursType&quot;&gt;
&gt;         &lt;dark-red/&gt;
&gt;     &lt;/colour&gt;                 
&gt;                  
&gt; &lt;/extended-graphics&gt;     
&gt;  
&gt; 
&gt; So in the xml, i am trying to use the extended 
&gt; &quot;more-coloursType&quot; and specifying a &quot;dark-red&quot; value. But 
&gt; this fails validation, with a message saying that &quot;dark-red&quot; 
&gt; is not allowed in this place. It starts working if i first 
&gt; have a normal colour (either red or blue) and then have dark-red: 
&gt; 
&gt; &lt;colours xsi:type=&quot;more-coloursType&quot;&gt;
&gt;         &lt;blue/&gt;
&gt;         &lt;dark-red/&gt;
&gt;     &lt;/colour&gt;   
&gt; 
&gt; My understanding was with this kind of extension, with the 
&gt; &quot;choice&quot; elements i would have something like: 
&gt; 
&gt; (red | blue)* (dark-red | dark-blue)*
&gt; 
&gt; but this doesn't seem to be the case. Am i missing something? 
&gt; Are there any changes that i'll have to make to my xsd to allow: 
&gt; 
&gt;      &lt;colours xsi:type=&quot;more-coloursType&quot;&gt;
&gt;         &lt;dark-red/&gt;
&gt;     &lt;/colour&gt;  
&gt; 
&gt; regards,
&gt; -Jaikiran
&gt; 
&gt; 
&gt; 
&gt;       The INTERNET now has a personality. YOURS! See your 
&gt; Yahoo! Homepage. http://in.yahoo.com/
&gt; --0-1910538151-1262010512=0684
&gt; Content-Type: text/html; charset=o-8859-1
&gt; Content-Transfer-Encoding: quoted-printable
&gt; 
&gt; &lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; &gt;&lt;tr&gt;&lt;td 
&gt; valign=&quot;top&quot; style=&quot;font: inherit;&quot;&gt;Hello everyone,&lt;br&gt;&lt;br&gt;I 
&gt; have been trying to &quot;extend&quot; a type which allows xsd:choice 
&gt; model group to add a couple of more allowed choice elements. 
&gt; Here's the original xsd:&lt;br&gt;&lt;br&gt;&amp;lt;?xml version=&quot;1.0&quot; 
&gt; encoding=&quot;UTF-8&quot;?&amp;gt;&lt;br&gt;&amp;lt;xsd:schema 
&gt; xmlns=&quot;http://www.w3.org/2001/XMLSchema&quot;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&gt; targetNamespace=&quot;http://www.myapp.org/xml/ns/myapp&quot;&lt;br&gt;&amp;nbsp;&amp;
&gt; nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&gt; xmlns:myapp=&quot;http://www.myapp.org/xml/ns/myapp&quot;&lt;br&gt;&amp;nbsp;&amp;nbsp
&gt; ;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&gt; xmlns:xsd=&quot;http://www.w3.org/2001/XMLSchema&quot;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;n
&gt; bsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&gt; elementFormDefault=&quot;qualified&quot;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbs
&gt; p;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&gt;  
&gt; attributeFormDefault=&quot;unqualified&quot;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&gt; version=&quot;1.0&quot;&amp;gt;&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;xsd:element 
&gt; name=&quot;graphics&quot; type=&quot;graphicsType/&amp;gt;&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp; 
&gt; &amp;nbsp;&amp;lt;xsd:complexType 
&gt; name=&quot;graphicsType&quot;&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; 
&gt; &amp;nbsp;&amp;lt;xsd:sequence&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; 
&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;xsd:element name=&quot;colours&quot; 
&gt; type=&quot;coloursType&quot;/&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; 
&gt; &amp;nbsp;&amp;lt;/xsd:sequence&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp; 
&gt; &amp;nbsp;&amp;lt;/xsd:complexType&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp; 
&gt; &amp;nbsp;&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;xsd:complexType 
&gt; name=&quot;coloursType&quot;&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp; 
&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;xsd:choice 
&gt; maxOccurs=&quot;unbounded&quot;&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;xsd:element 
&gt; name=&quot;red&quot;&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; 
&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;xsd:complexType 
&gt; /&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;  
&gt; &amp;nbsp;&amp;lt;/xsd:elemen&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; 
&gt; &amp;nbsp;&amp;lt;xsd:element name=&quot;blue&quot;&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp; 
&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; 
&gt; &amp;nbsp;&amp;lt;xsd:complexType /&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp; 
&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; 
&gt; &amp;nbsp;&amp;lt;/xsd:element&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; 
&gt; &amp;lt;/xsd:choice&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp; 
&gt; &amp;nbsp;&amp;lt;/xsd:complexType&amp;gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; 
&gt; &amp;nbsp;&lt;br&gt;&amp;lt;/xsd:schema&amp;gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;The extended xsd is 
&gt; as follows: &lt;br&gt;&lt;br&gt;&amp;lt;?xml version=&quot;1.0&quot; 
&gt; encoding=&quot;UTF-8&quot;?&amp;gt;&lt;br&gt;&amp;lt;xsd:schema 
&gt; xmlns=&quot;http://www.w3.org/2001/XMLSchema&quot;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&gt; targetNamespace=&quot;http://www.myapp.org/xml/ns/myapp&quot;&lt;br&gt;&amp;nbsp;&amp;
&gt; nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&gt; xmlns:myapp=&quot;http://www.myapp.org/xml/ns/myapp&quot;&lt;br&gt;&amp;nbsp;&amp;nbsp
&gt; ;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&gt;  
&gt; xmlns:xsd=&quot;http://www.w3.org/2001/XMLSchema&quot;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;n
&gt; bsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&gt; elementFormDefault=&quot;qualified&quot;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbs
&gt; p;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&gt; attributeFormDefault=&quot;unqualified&quot;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&gt; version=&quot;1.0&quot;&amp;gt;&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;xsd:element 
&gt; name=&quot;extended-graphics&quot; 
&gt; type=&quot;extended-graphicsType/&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp; 
&gt; &amp;nbsp;&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;xsd:complexType 
&gt; name=&quot;extended-graphicsType&quot;&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp; 
&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;xsd:extension 
&gt; base=&quot;graphicsType&quot;&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; 
&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;xsd:sequence&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp; 
&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; 
&gt; &amp;nbsp;&amp;lt;xsd:element name=&quot;brush&quot; 
&gt; type=&quot;xsd:string&quot;/&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; 
&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; 
&gt; &amp;nbsp;&amp;lt;/xsd:sequence&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp; 
&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;  
&gt; &amp;nbsp;&amp;lt;/xsd:extension&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp; 
&gt; &amp;nbsp;&amp;lt;/xsd:complexType&amp;gt;&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp; 
&gt; &amp;nbsp;&amp;lt;xsd:complexType name=&quot;more-coloursType&quot; 
&gt; &amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; 
&gt; &amp;nbsp;&amp;lt;xsd:extension 
&gt; base=&quot;coloursType&quot;&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; 
&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;xsd:choice 
&gt; maxOccurs=&quot;unbounded&quot;&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; 
&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;xsd:element 
&gt; name=&quot;dark-red&quot;&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; 
&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; 
&gt; &amp;nbsp;&amp;lt;xsd:complexType /&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp; 
&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; 
&gt; &amp;nbsp;&amp;lt;/xsd:elemen&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; 
&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;xsd:element 
&gt; name=&quot;dark-blue&quot;&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; 
&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; 
&gt; &amp;nbsp;&amp;lt;xsd:complexType  /&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp; 
&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; 
&gt; &amp;nbsp;&amp;lt;/xsd:element&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&gt;  &amp;nbsp;&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; 
&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;/xsd:choice&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp; 
&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; 
&gt; &amp;nbsp;&amp;lt;/xsd:extension&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp; 
&gt; &amp;nbsp;&amp;lt;/xsd:complexType&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp; 
&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;br&gt;&amp;lt;/xsd:schema&amp;gt;&lt;br&gt;&lt;br&gt;So 
&gt; here i have a &quot;coloursType&quot; with a choice of &quot;red&quot; and &quot;blue&quot; 
&gt; and the extended &quot;more-coloursType&quot; has the additional 
&gt; &quot;dark-red&quot; and &quot;dark-blue&quot;. Then in my xml i am trying to do 
&gt; this:&lt;br&gt;&lt;br&gt;&amp;lt;extended-graphics 
&gt; xmlns=&quot;http://www.myapp.org/xml/ns/myapp&quot;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp
&gt; ;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&gt; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;&lt;br&gt;&amp;nbsp
&gt; ;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;
&gt; nbsp; 
&gt; xmlns:myapp=&quot;http://www.myapp.org/xml/ns/myapp&quot;&amp;gt;&lt;br&gt;&lt;br&gt;&amp;nb
&gt; sp;&amp;nbsp;
&gt;  &amp;nbsp;&amp;lt;colours 
&gt; xsi:type=&quot;more-coloursType&quot;&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp; 
&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;dark-red/&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp; 
&gt; &amp;nbsp;&amp;lt;/colour&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp
&gt; ;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&gt; &amp;nbsp;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbs
&gt; p;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&gt; &amp;nbsp;&lt;br&gt;&amp;lt;/extended-graphics&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&gt; &amp;nbsp;&lt;br&gt;&amp;nbsp;&lt;br&gt;&lt;br&gt;So in the xml, i am trying to use the 
&gt; extended &quot;more-coloursType&quot; and specifying a &quot;dark-red&quot; 
&gt; value. But this fails validation, with a message saying that 
&gt; &quot;dark-red&quot; is not allowed in this place. It starts working if 
&gt; i first have a normal colour (either red or blue) and then 
&gt; have dark-red: &lt;br&gt;&lt;br&gt;&amp;lt;colours 
&gt; xsi:type=&quot;more-coloursType&quot;&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp; 
&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;blue/&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp; 
&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;dark-red/&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp; 
&gt; &amp;nbsp;&amp;lt;/colour&amp;gt;&amp;nbsp; &amp;nbsp;&lt;br&gt;&lt;br&gt;My understanding 
&gt; was with this kind  of extension, with the &quot;choice&quot; elements 
&gt; i would have something like: &lt;br&gt;&lt;br&gt;(red | blue)* (dark-red 
&gt; | dark-blue)*&lt;br&gt;&lt;br&gt;but this doesn't seem to be the case. Am 
&gt; i missing something? Are there any changes that i'll have to 
&gt; make to my xsd to allow: &lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&gt; &amp;lt;colours xsi:type=&quot;more-coloursType&quot;&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp; 
&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;dark-red/&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp; 
&gt; &amp;nbsp;&amp;lt;/colour&amp;gt;&amp;nbsp; 
&gt; &lt;br&gt;&lt;br&gt;regards,&lt;br&gt;-Jaikiran&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;br&gt;
&gt; 
&gt; 
&gt; 
&gt;       &lt;!--1--&gt;&lt;hr size=1&gt;&lt;/hr&gt;
&gt; The INTERNET now has a personality. YOURS! &lt;a 
&gt; href=&quot;http://in.rd.yahoo.com/tagline_yyi_1/*http://in.yahoo.co
&gt; m/&quot; target=&quot;_blank&quot;&gt;See your Yahoo! Homepage&lt;/a&gt;.
&gt; --0-1910538151-1262010512=0684--
&gt; 
&gt; 
</pre>
<span id="received"><dfn>Received on</dfn> Wednesday, 30 December 2009 16:26:49 GMT</span>
</div>
]]></content></entry><entry><title>Re: Extending &amp;quot;choice&amp;quot; model group in a xsd schema </title><id>http://xsd.stylusstudio.com/2009Dec/post09001.htm</id><link rel="alternate" type="text/html" href="http://xsd.stylusstudio.com/2009Dec/post09001.htm" /><updated>2009-12-30T10:18:59Z</updated><content type="text/plain"><![CDATA[<pre id="body">
<a name="start19" accesskey="j" id="start19"></a>On 12/28/2009 9:28 AM, Jaikiran Pai wrote:
&gt; (red | blue)* (dark-red | dark-blue)*

What you actually have is:
  (red | blue)+ (dark-red | dark-blue)+

Your choice groups don't have minOccurs=0. 

If you are after (red | blue | dark-red | dark-blue)+, you aren't going 
to achieve it the way you are going.  <a title="Walmsley" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/priscilla_walmsley.html">Walmsley</a> suggests using 
substitution groups to extend choice groups (see 19.5.2 Extensions for 
Choice Groups, in <a title="XML Schema Tutorial" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/videos/xmlschema1/xmlschema1.html">Definitive XML Schema</a>).  You might take a look at that 
approach and see if it meets your needs.

-- 
Kevin Braun
Objective Systems, Inc.
REAL WORLD ASN.1 AND XML SOLUTIONS
Tel: +1 (484) 875-9841
Fax: +1 (484) 875-9830
Toll-free: (877) 307-6855 (USA only)
http://www.obj-sys.com
</pre>
<span id="received"><dfn>Received on</dfn> Wednesday, 30 December 2009 15:21:50 GMT</span>
</div>
]]></content></entry><entry><title>Extending &amp;quot;choice&amp;quot; model group in a xsd schema </title><id>http://xsd.stylusstudio.com/2009Dec/post08001.htm</id><link rel="alternate" type="text/html" href="http://xsd.stylusstudio.com/2009Dec/post08001.htm" /><updated>2009-12-28T19:58:32Z</updated><content type="text/plain"><![CDATA[<pre id="body">
<a name="start18" accesskey="j" id="start18"></a>

</pre>
<div>
<ul>
<li>text/html attachment: <a href="att-0018/00-part">stored</a></li>
</ul>
<!-- attachment="00-part" -->
</div>
<span id="received"><dfn>Received on</dfn> Wednesday, 30 December 2009 12:52:42 GMT</span>
</div>
]]></content></entry><entry><title>Re: [RESEND] Derivation by restriction </title><id>http://xsd.stylusstudio.com/2009Dec/post06001.htm</id><link rel="alternate" type="text/html" href="http://xsd.stylusstudio.com/2009Dec/post06001.htm" /><updated>2009-12-11T14:03:51Z</updated><content type="text/plain"><![CDATA[<pre id="body">
<a name="start16" accesskey="j" id="start16"></a>This <a title="discussion" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/SSDN/default.asp">discussion</a> was a long time ago:
<a href="post09021.htm">http://lists.w3.org/Archives/Public/xmlschema-dev/2002Mar/0219.html</a>

but it seems that I've reached the same problem.

Opposite to Roger L. Costello statement, Best Practices from xFront
*advises* parallel substitution group element hierarchies in elements and
element containers as well. See &quot;Implementing Substitution Group Element
Hierarchies&quot; in:
http://www.xfront.com/ElementHierarchy.html

I've seen in &quot;OpenGISR <a title="GML - a Markup Language for Geography" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://schemas.stylusstudio.com/opengis/index.html">Geography Markup Language</a> (GML) <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_other.html">Encoding</a> Standard&quot;
version 3.2.1 opened possibility for this, e.g. in 21.4.2.2 &quot;User-defined
geometry property types&quot; we have:
&quot;A geometry property type may be a restriction of gml:GeometryPropertyType,
but this is not a requirement.&quot;

My question is - why it is not a practice in GML 3.2.1?:

In GML, we have AbstractGeometry element:

&lt;element name=&quot;AbstractGeometry&quot; type=&quot;gml:AbstractGeometryType&quot;
abstract=&quot;true&quot; substitutionGroup=&quot;gml:AbstractGML&quot;/&gt;

and &quot;generic&quot; Property type (container) like below:

&lt;complexType name=&quot;GeometryPropertyType&quot;&gt;
    &lt;sequence minOccurs=&quot;0&quot;&gt;
        &lt;element ref=&quot;gml:AbstractGeometry&quot;/&gt;
    &lt;/sequence&gt;
    &lt;attributeGroup ref=&quot;gml:AssociationAttributeGroup&quot;/&gt;
    &lt;attributeGroup ref=&quot;gml:OwnershipAttributeGroup&quot;/&gt;
&lt;/complexType&gt;

Then there are *lot of* concrete geometry types, extending
AbstractGeometryType, and associated geometry elements, belonging to
substitutionGroup of AbstractGeometry. e.g. Point (indirect derivation and
obsolete content simplified for brevity):

&lt;complexType name=&quot;PointType&quot;&gt;
    &lt;complexContent&gt;
        &lt;extension base=&quot;gml:AbstractGeometryType&quot;&gt;
            &lt;sequence&gt;
                &lt;element ref=&quot;gml:pos&quot;/&gt;
            &lt;/sequence&gt;
        &lt;/extension&gt;
    &lt;/complexContent&gt;
&lt;/complexType&gt;

&lt;element name=&quot;Point&quot; type=&quot;gml:PointType&quot;
substitutionGroup=&quot;gml:AbstractGeometry&quot;/&gt;

All these Point, Curve, Surface, ..., PointArray, CurveArray, SurfaceArray,
... have their own Property (container) types defined but not within any
hierarchy, only &quot;following the same pattern&quot;, like below:

&lt;complexType name=&quot;PointPropertyType&quot;&gt;
    &lt;sequence minOccurs=&quot;0&quot;&gt;
        &lt;element ref=&quot;gml:Point&quot;/&gt;
    &lt;/sequence&gt;
    &lt;attributeGroup ref=&quot;gml:AssociationAttributeGroup&quot;/&gt;
    &lt;attributeGroup ref=&quot;gml:OwnershipAttributeGroup&quot;/&gt;
&lt;/complexType&gt;

My question is: What's wrong with defining all similar containers using
&quot;infamous&quot; derivation by restriction, like below:

&lt;complexType name=&quot;PointPropertyType&quot;&gt;
    &lt;complexContent&gt;
        &lt;restriction base=&quot;gml:GeometryPropertyType&quot;&gt;
            &lt;sequence&gt;
                &lt;element ref=&quot;gml:Point&quot;/&gt;
            &lt;/sequence&gt;
        &lt;/restriction&gt;
    &lt;/complexContent&gt;
&lt;/complexType&gt;

Is it only due to troubles with <a title="MSXML 3.0" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/microsoft/msxml.html">MSXML</a> validation (see
http://markmail.org/message/fotntmddcmmwhkoc) ?

Element gml:Point is in substitution group of gml:AbstractGeometry, so can
be used here, isn't it? Ot it is the problem that PointType is EXTENSION of 
AbstractGeometryType, while I suggest to define PointPropertyType as
RESTRICTION of GeometryPropertyType? Best Practices paper cited above
doesn't mention about this.

With my suggestion, at least two benefits can be seen:

- after changing or extending usage of attributeGroup's
(gml:AssociationAttributeGroup, gml:OwnershipAttributeGroup) it wouldn't be
necessary to &quot;follow the same pattern&quot; in all duplicated container
definitions;

- it would be possible to define some flexible content models allowing
Feature to have *any* geometryProperty, replaceable by concrete
pointProperty, curveProperty and so on;

This flexibility would be specifically convenient when creating layered
schemas - flexible generic one with &quot;templated&quot;, and concretized specific
ones with restricted content.

Please explain me where I'm wrong.
</pre>
<span id="received"><dfn>Received on</dfn> Friday, 11 December 2009 13:04:35 GMT</span>
</div>
]]></content></entry><entry><title>RE: [RESEND] Derivation by restriction </title><id>http://xsd.stylusstudio.com/2009Dec/post07001.htm</id><link rel="alternate" type="text/html" href="http://xsd.stylusstudio.com/2009Dec/post07001.htm" /><updated>2009-12-11T09:13:00Z</updated><content type="text/plain"><![CDATA[<pre id="body">
<a name="start17" accesskey="j" id="start17"></a>
[
I've seen in &quot;OpenGISR <a title="GML - a Markup Language for Geography" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://schemas.stylusstudio.com/opengis/index.html">Geography Markup Language</a> (GML) <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_other.html">Encoding</a>
<a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/w3c/">Standard</a>&quot;
version 3.2.1 opened possibility for this, e.g. in 21.4.2.2
&quot;User-defined
geometry property types&quot; we have:
&quot;A geometry property type may be a restriction of
gml:GeometryPropertyType,
but this is not a requirement.&quot;

My question is - why it is not a practice in GML 3.2.1?:
]

My understanding is that this is intended to say that in comparison with
the encouraged GML object type hierarchy, the property type hierarchy is
not necessary in GML, and it may be avoided to prevent from the
complicated issues in <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/open_xsd_validation.html">schema validation</a> as you suggested, and
difficulties in instance processing caused by the
derivation-by-restriction as there is no compatible concept in either
conventional OO programming languages or relational database theory. 

Lisa
   


-----Original Message-----
From: <a href="mailto:xmlschema-dev-request&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;?Subject=RE%3A%20%5BRESEND%5D%20Derivation%20by%20restriction&amp;In-Reply-To=%253C4E1D53230994FD45A119B5090DFBF4600220B406%40andalusia.Galdos.local%253E&amp;References=%253C4E1D53230994FD45A119B5090DFBF4600220B406%40andalusia.Galdos.local%253E">xmlschema-dev-request&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;</a> [mailto:<a href="mailto:xmlschema-dev-request&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;?Subject=RE%3A%20%5BRESEND%5D%20Derivation%20by%20restriction&amp;In-Reply-To=%253C4E1D53230994FD45A119B5090DFBF4600220B406%40andalusia.Galdos.local%253E&amp;References=%253C4E1D53230994FD45A119B5090DFBF4600220B406%40andalusia.Galdos.local%253E">xmlschema-dev-request&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;</a>]
On Behalf Of Krzysztof Fink-Finowicki
Sent: Friday, December 11, 2009 5:04 AM
To: <a href="mailto:xmlschema-dev&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;?Subject=RE%3A%20%5BRESEND%5D%20Derivation%20by%20restriction&amp;In-Reply-To=%253C4E1D53230994FD45A119B5090DFBF4600220B406%40andalusia.Galdos.local%253E&amp;References=%253C4E1D53230994FD45A119B5090DFBF4600220B406%40andalusia.Galdos.local%253E">xmlschema-dev&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;</a>
Subject: Re: [RESEND] Derivation by restriction

This <a title="discussion" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/SSDN/default.asp">discussion</a> was a long time ago:
<a href="post09021.htm">http://lists.w3.org/Archives/Public/xmlschema-dev/2002Mar/0219.html</a>

but it seems that I've reached the same problem.

Opposite to Roger L. Costello statement, Best Practices from xFront
*advises* parallel substitution group element hierarchies in elements
and
element containers as well. See &quot;Implementing Substitution Group Element
Hierarchies&quot; in:
http://www.xfront.com/ElementHierarchy.html

I've seen in &quot;OpenGISR Geography Markup Language (GML) Encoding
Standard&quot;
version 3.2.1 opened possibility for this, e.g. in 21.4.2.2
&quot;User-defined
geometry property types&quot; we have:
&quot;A geometry property type may be a restriction of
gml:GeometryPropertyType,
but this is not a requirement.&quot;

My question is - why it is not a practice in GML 3.2.1?:

In GML, we have AbstractGeometry element:

&lt;element name=&quot;AbstractGeometry&quot; type=&quot;gml:AbstractGeometryType&quot;
abstract=&quot;true&quot; substitutionGroup=&quot;gml:AbstractGML&quot;/&gt;

and &quot;generic&quot; Property type (container) like below:

&lt;complexType name=&quot;GeometryPropertyType&quot;&gt;
    &lt;sequence minOccurs=&quot;0&quot;&gt;
        &lt;element ref=&quot;gml:AbstractGeometry&quot;/&gt;
    &lt;/sequence&gt;
    &lt;attributeGroup ref=&quot;gml:AssociationAttributeGroup&quot;/&gt;
    &lt;attributeGroup ref=&quot;gml:OwnershipAttributeGroup&quot;/&gt;
&lt;/complexType&gt;

Then there are *lot of* concrete geometry types, extending
AbstractGeometryType, and associated geometry elements, belonging to
substitutionGroup of AbstractGeometry. e.g. Point (indirect derivation
and
obsolete content simplified for brevity):

&lt;complexType name=&quot;PointType&quot;&gt;
    &lt;complexContent&gt;
        &lt;extension base=&quot;gml:AbstractGeometryType&quot;&gt;
            &lt;sequence&gt;
                &lt;element ref=&quot;gml:pos&quot;/&gt;
            &lt;/sequence&gt;
        &lt;/extension&gt;
    &lt;/complexContent&gt;
&lt;/complexType&gt;

&lt;element name=&quot;Point&quot; type=&quot;gml:PointType&quot;
substitutionGroup=&quot;gml:AbstractGeometry&quot;/&gt;

All these Point, Curve, Surface, ..., PointArray, CurveArray,
SurfaceArray,
... have their own Property (container) types defined but not within any
hierarchy, only &quot;following the same pattern&quot;, like below:

&lt;complexType name=&quot;PointPropertyType&quot;&gt;
    &lt;sequence minOccurs=&quot;0&quot;&gt;
        &lt;element ref=&quot;gml:Point&quot;/&gt;
    &lt;/sequence&gt;
    &lt;attributeGroup ref=&quot;gml:AssociationAttributeGroup&quot;/&gt;
    &lt;attributeGroup ref=&quot;gml:OwnershipAttributeGroup&quot;/&gt;
&lt;/complexType&gt;

My question is: What's wrong with defining all similar containers using
&quot;infamous&quot; derivation by restriction, like below:

&lt;complexType name=&quot;PointPropertyType&quot;&gt;
    &lt;complexContent&gt;
        &lt;restriction base=&quot;gml:GeometryPropertyType&quot;&gt;
            &lt;sequence&gt;
                &lt;element ref=&quot;gml:Point&quot;/&gt;
            &lt;/sequence&gt;
        &lt;/restriction&gt;
    &lt;/complexContent&gt;
&lt;/complexType&gt;

Is it only due to troubles with MSXML validation (see
http://markmail.org/message/fotntmddcmmwhkoc) ?

Element gml:Point is in substitution group of gml:AbstractGeometry, so
can
be used here, isn't it? Ot it is the problem that PointType is EXTENSION
of 
AbstractGeometryType, while I suggest to define PointPropertyType as
RESTRICTION of GeometryPropertyType? Best Practices paper cited above
doesn't mention about this.

With my suggestion, at least two benefits can be seen:

- after changing or extending usage of attributeGroup's
(gml:AssociationAttributeGroup, gml:OwnershipAttributeGroup) it wouldn't
be
necessary to &quot;follow the same pattern&quot; in all duplicated container
definitions;

- it would be possible to define some flexible content models allowing
Feature to have *any* geometryProperty, replaceable by concrete
pointProperty, curveProperty and so on;

This flexibility would be specifically convenient when creating layered
schemas - flexible generic one with &quot;templated&quot;, and concretized
specific
ones with restricted content.

Please explain me where I'm wrong.
</pre>
<span id="received"><dfn>Received on</dfn> Friday, 11 December 2009 17:13:52 GMT</span>
</div>
]]></content></entry><entry><title>Re: Why xsi:type works only inwards, not outwards? </title><id>http://xsd.stylusstudio.com/2009Dec/post03001.htm</id><link rel="alternate" type="text/html" href="http://xsd.stylusstudio.com/2009Dec/post03001.htm" /><updated>2009-12-03T15:45:29Z</updated><content type="text/plain"><![CDATA[<pre id="body">
<a name="start13" accesskey="j" id="start13"></a>

On 12/3/2009 3:08 PM, Krzysztof FF wrote:
&gt; Kevin Braun wrote:
&gt;   
&gt;&gt; Hi,
&gt;&gt;
&gt;&gt; One brief comment embedded below.
&gt;&gt;
&gt;&gt; Kevin
&gt;&gt;
&gt;&gt; On 12/3/2009 11:13 AM, Krzysztof FF wrote:
&gt;&gt;     
&gt;&gt;&gt; Hi all,
&gt;&gt;&gt;
&gt;&gt;&gt;       
&gt;&gt; [...]
&gt;&gt;     
&gt;&gt;&gt; BUT USING xsi:type on both levels is illegal:
&gt;&gt;&gt;
&gt;&gt;&gt; &lt;sys:Entity xsi:type=&quot;RoomType&quot;&gt;
&gt;&gt;&gt; &lt;!-- namespaces omitted for brevity --&gt;
&gt;&gt;&gt;     &lt;sys:category xsi:type=&quot;RoomCategoryType&quot;&gt;living&lt;/sys:category&gt;
&gt;&gt;&gt; &lt;/sys:Entity1&gt;
&gt;&gt;&gt;
&gt;&gt;&gt;   
&gt;&gt;&gt;       
&gt;&gt; I believe this would be invalid because you have indicated that 
&gt;&gt; sys:Entity is actually a &quot;RoomType&quot;, but then you give a sys:category 
&gt;&gt; for the child, which is not legal according to &quot;RoomType&quot; - you need an 
&gt;&gt; &quot;app:roomCategory&quot; element.  Once you tell it the type the element 
&gt;&gt; should be validated against, you have to follow the model for that type.
&gt;&gt;
&gt;&gt;     
&gt;
&gt; But I told that sys:category is actually RoomCategoryType using xsi:type, so
&gt; why id doesn't works? Why actual type is not exposed, only plain one?
&gt;   
When you told it the type for sys:Entity was RoomType, you were telling 
it you are going to provide data that would validate against RoomType.  
In other words, you are essentially saying &quot;don't accept a sys:category 
element, be more restrictive and demand an app:roomCategory element&quot;.  
Yes, you specified &quot;RoomCategoryType&quot; for the sys:category element, but 
RoomType doesn't allow just *any* element of RoomCategoryType, it 
requires an app:roomCategory element (or an element in its substitution 
group).  The definition of RoomType specifies not only the type of 
elements that should appear, but also the names for those elements.

I hope that helps.

-Kevin
</pre>
<span id="received"><dfn>Received on</dfn> Thursday,  3 December 2009 20:48:09 GMT</span>
</div>
]]></content></entry><entry><title>Re: Why xsi:type works only inwards, not outwards? </title><id>http://xsd.stylusstudio.com/2009Dec/post01001.htm</id><link rel="alternate" type="text/html" href="http://xsd.stylusstudio.com/2009Dec/post01001.htm" /><updated>2009-12-03T14:00:20Z</updated><content type="text/plain"><![CDATA[<pre id="body">
<a name="start11" accesskey="j" id="start11"></a>Hi,

One brief comment embedded below.

Kevin

On 12/3/2009 11:13 AM, Krzysztof FF wrote:
&gt; Hi all,
&gt;
&gt; I'm trying <a title="How To Build XML Schemas" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/videos/xmlschema1/xmlschema1.html">to define two-level layered schema</a> - one with generic &quot;system&quot;
&gt; model, second with specific &quot;application&quot; model.
&gt;
&gt; When trying to expose application data using generic system model elements
&gt; specified by using xsi:type attribute referring to application model types,
&gt; I've encountered some asymetry in treating it while validating data.
&gt;
&gt; My example is somehow simplified so as to reflect the issue from topic.
&gt;
&gt; Let's start with system schema, sys.xsd:
&gt;
&gt; &lt;schema 
&gt;     targetNamespace=&quot;http://www.org.com/SYS&quot; 
&gt;     xmlns:sys=&quot;http://www.org.com/SYS&quot;
&gt;     xmlns:xsd=&quot;http://www.<a title="w3" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/w3c/">w3</a>.org/2001/XMLSchema&quot; 
&gt;     xmlns=&quot;http://www.w3.org/2001/XMLSchema&quot;
&gt;     elementFormDefault=&quot;qualified&quot;&gt;
&gt;
&gt;     &lt;element name=&quot;Entity&quot; type=&quot;sys:EntityType&quot;/&gt;
&gt;     &lt;complexType name=&quot;EntityType&quot;&gt;
&gt;         &lt;sequence minOccurs=&quot;0&quot; maxOccurs=&quot;unbounded&quot;&gt;
&gt;             &lt;element ref=&quot;sys:category&quot;/&gt;
&gt;         &lt;/sequence&gt;
&gt;     &lt;/complexType&gt;
&gt;
&gt;     &lt;element name=&quot;category&quot; type=&quot;sys:CategoryType&quot;/&gt;
&gt;     &lt;simpleType name=&quot;CategoryType&quot;&gt;
&gt;         &lt;restriction base=&quot;string&quot;/&gt;
&gt;     &lt;/simpleType&gt;
&gt;     
&gt; &lt;/schema&gt;
&gt;
&gt; Now I want to define specific rules for Room derived from Entity by
&gt; restriction in app.xsd:
&gt;
&gt; &lt;schema 
&gt;     targetNamespace=&quot;http://www.org.com/APP&quot;
&gt;     xmlns:app=&quot;http://www.org.com/APP&quot;
&gt;     xmlns:sys=&quot;http://www.org.com/SYS&quot; 
&gt;     xmlns:xsd=&quot;http://www.w3.org/2001/XMLSchema&quot; 
&gt;     xmlns=&quot;http://www.w3.org/2001/XMLSchema&quot; 
&gt;     elementFormDefault=&quot;qualified&quot;&gt;
&gt;
&gt;     &lt;import 
&gt;         namespace=&quot;http://www.org.com/SYS&quot; 
&gt;         schemaLocation=&quot;sys.xsd&quot;/&gt;
&gt;
&gt;     &lt;element name=&quot;Room&quot; type=&quot;app:RoomType&quot; substitutionGroup=&quot;sys:Entity&quot;
&gt; /&gt;
&gt;     &lt;complexType name=&quot;RoomType&quot;&gt;
&gt;         &lt;complexContent&gt;
&gt;             &lt;restriction base=&quot;sys:EntityType&quot;&gt;
&gt;                 &lt;sequence&gt;
&gt;                     &lt;element ref=&quot;app:roomCategory&quot;&gt;&lt;/element&gt;
&gt;                 &lt;/sequence&gt;
&gt;             &lt;/restriction&gt;
&gt;         &lt;/complexContent&gt;
&gt;     &lt;/complexType&gt;
&gt;
&gt;     &lt;element name=&quot;roomCategory&quot; type=&quot;app:RoomCategoryType&quot;
&gt; substitutionGroup=&quot;sys:category&quot;/&gt;
&gt;     &lt;simpleType name=&quot;RoomCategoryType&quot;&gt;
&gt;         &lt;restriction base=&quot;sys:CategoryType&quot;&gt;
&gt;             &lt;enumeration value=&quot;living&quot;&gt;&lt;/enumeration&gt;
&gt;             &lt;enumeration value=&quot;bedroom&quot;&gt;&lt;/enumeration&gt;
&gt;             &lt;enumeration value=&quot;kitchen&quot;&gt;&lt;/enumeration&gt;
&gt;         &lt;/restriction&gt;
&gt;     &lt;/simpleType&gt;
&gt;     
&gt; &lt;/schema&gt;
&gt;
&gt; Now I can write data using application model:
&gt;
&gt; &lt;Room&gt;
&gt; &lt;!-- namespaces omitted for brevity --&gt;
&gt;     &lt;roomCategory&gt;living&lt;/roomCategory&gt;
&gt; &lt;/Room&gt;
&gt;
&gt; I could write the same data using plain system model, because Room is
&gt; derived from Entity by restriction:
&gt;
&gt; &lt;sys:Entity&gt;
&gt; &lt;!-- namespaces omitted for brevity --&gt;
&gt;     &lt;sys:category&gt;living&lt;/sys:category&gt;
&gt; &lt;/sys:Entity1&gt;
&gt;
&gt; The reason for flattening data to system model is to make it understandable
&gt; for some low-level processing, whatever it is (i.e. without exact knowledge
&gt; on application specifics).
&gt;
&gt; But there are some drawbacks:
&gt; - validation can be made only against system schema, not application schema;
&gt; - information about actual application types has been stripped out, although
&gt; it could be of later use for some high-level processing, whatever it is
&gt; (i.e. using knowledge of aplication specifics).
&gt;
&gt; My natural attempt was to use xsi:type attribute.
&gt;
&gt; But it occured that I can write 
&gt;
&gt; &lt;sys:Entity xsi:type=&quot;RoomType&quot;&gt;
&gt; &lt;!-- namespaces omitted for brevity --&gt;
&gt;     &lt;roomCategory&gt;living&lt;/roomCategory&gt;
&gt; &lt;/sys:Entity1&gt;
&gt;
&gt; OR
&gt;
&gt; &lt;sys:Entity&gt;
&gt; &lt;!-- namespaces omitted for brevity --&gt;
&gt;     &lt;sys:category xsi:type=RoomCategoryType&quot;&gt;living&lt;/sys:category&gt;
&gt; &lt;/sys:Entity&gt;
&gt;
&gt; BUT USING xsi:type on both levels is illegal:
&gt;
&gt; &lt;sys:Entity xsi:type=&quot;RoomType&quot;&gt;
&gt; &lt;!-- namespaces omitted for brevity --&gt;
&gt;     &lt;sys:category xsi:type=RoomCategoryType&quot;&gt;living&lt;/sys:category&gt;
&gt; &lt;/sys:Entity1&gt;
&gt;
&gt;   
I believe this would be invalid because you have indicated that 
sys:Entity is actually a &quot;RoomType&quot;, but then you give a sys:category 
for the child, which is not legal according to &quot;RoomType&quot; - you need an 
&quot;app:roomCategory&quot; element.  Once you tell it the type the element 
should be validated against, you have to follow the model for that type.
&gt; It seems that xsi:type &quot;works&quot; inwards, forcing inner content of element to
&gt; be validated along referred type. But in the same time, it does not work
&gt; outwards, i.e. inner element is not exposed as referred type - element name
&gt; is interpreted explicitly instead.
&gt;
&gt; This is what I assume some drawback in how XML schema works, and causes my
&gt; concept for exposing data using layered schemas to be illegal.
&gt;
&gt; I wonder if somebody could explain if there are some valid reasons for
&gt; hiding xsi:type attribute referred from inner elements to their parent
&gt; elements.
&gt;
&gt;
&gt;
&gt;   
Kevin Braun
-- 
Objective Systems, Inc.
REAL WORLD ASN.1 AND XML SOLUTIONS
Tel: +1 (484) 875-9841
Fax: +1 (484) 875-9830
Toll-free: (877) 307-6855 (USA only)
http://www.obj-sys.com
</pre>
<span id="received"><dfn>Received on</dfn> Thursday,  3 December 2009 19:03:05 GMT</span>
</div>
]]></content></entry><entry><title>Re: Why xsi:type works only inwards, not outwards? </title><id>http://xsd.stylusstudio.com/2009Dec/post04001.htm</id><link rel="alternate" type="text/html" href="http://xsd.stylusstudio.com/2009Dec/post04001.htm" /><updated>2009-12-03T13:18:46Z</updated><content type="text/plain"><![CDATA[<pre id="body">
<a name="start14" accesskey="j" id="start14"></a>

Kevin Braun wrote:
&gt; 
&gt; 
&gt; When you told it the type for sys:Entity was RoomType, you were telling 
&gt; it you are going to provide data that would validate against RoomType.  
&gt; In other words, you are essentially saying &quot;don't accept a sys:category 
&gt; element, be more restrictive and demand an app:roomCategory element&quot;.  
&gt; Yes, you specified &quot;RoomCategoryType&quot; for the sys:category element, but 
&gt; RoomType doesn't allow just *any* element of RoomCategoryType, it 
&gt; requires an app:roomCategory element (or an element in its substitution 
&gt; group).  The definition of RoomType specifies not only the type of 
&gt; elements that should appear, but also the names for those elements.
&gt; 
&gt; I hope that helps.
&gt; 
&gt; -Kevin
&gt; 
&gt; 

Yes, indeed. Now I understand.

It was probably my wishful thinking that threw me in conviction that my
concept *should* work.

Thank you for clear clarification.

Krzysztof
-- 
View this message in context: http://old.nabble.com/Why-xsi%3Atype-works-only-inwards%2C-not-outwards--tp26628621p26633339.html
Sent from the <a title="w3" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/w3c/">w3</a>.org - <a title="xmlschema-dev" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://xsd.stylusstudio.com">xmlschema-dev</a> <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/feeds/">mailing list</a> archive at Nabble.com.
</pre>
<span id="received"><dfn>Received on</dfn> Thursday,  3 December 2009 21:19:15 GMT</span>
</div>
]]></content></entry><entry><title>Re: Why xsi:type works only inwards, not outwards? </title><id>http://xsd.stylusstudio.com/2009Dec/post02001.htm</id><link rel="alternate" type="text/html" href="http://xsd.stylusstudio.com/2009Dec/post02001.htm" /><updated>2009-12-03T12:08:55Z</updated><content type="text/plain"><![CDATA[<pre id="body">
<a name="start12" accesskey="j" id="start12"></a>

Kevin Braun wrote:
&gt; 
&gt; Hi,
&gt; 
&gt; One brief comment embedded below.
&gt; 
&gt; Kevin
&gt; 
&gt; On 12/3/2009 11:13 AM, Krzysztof FF wrote:
&gt;&gt; Hi all,
&gt;&gt;
&gt; [...]
&gt;&gt;
&gt;&gt; BUT USING xsi:type on both levels is illegal:
&gt;&gt;
&gt;&gt; &lt;sys:Entity xsi:type=&quot;RoomType&quot;&gt;
&gt;&gt; &lt;!-- namespaces omitted for brevity --&gt;
&gt;&gt;     &lt;sys:category xsi:type=&quot;RoomCategoryType&quot;&gt;living&lt;/sys:category&gt;
&gt;&gt; &lt;/sys:Entity1&gt;
&gt;&gt;
&gt;&gt;   
&gt; I believe this would be invalid because you have indicated that 
&gt; sys:Entity is actually a &quot;RoomType&quot;, but then you give a sys:category 
&gt; for the child, which is not legal according to &quot;RoomType&quot; - you need an 
&gt; &quot;app:roomCategory&quot; element.  Once you tell it the type the element 
&gt; should be validated against, you have to follow the model for that type.
&gt; 

But I told that sys:category is actually RoomCategoryType using xsi:type, so
why id doesn't works? Why actual type is not exposed, only plain one?

It seems I have to live with that, but it doesn't suits me.

Thank you anyway.
-- 
View this message in context: http://old.nabble.com/Why-xsi%3Atype-works-only-inwards%2C-not-outwards--tp26628621p26632358.html
Sent from the <a title="w3" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/w3c/">w3</a>.org - <a title="xmlschema-dev" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://xsd.stylusstudio.com">xmlschema-dev</a> <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/feeds/">mailing list</a> archive at Nabble.com.
</pre>
<span id="received"><dfn>Received on</dfn> Thursday,  3 December 2009 20:09:30 GMT</span>
</div>
]]></content></entry><entry><title>Why xsi:type works only inwards, not outwards? </title><id>http://xsd.stylusstudio.com/2009Dec/post00001.htm</id><link rel="alternate" type="text/html" href="http://xsd.stylusstudio.com/2009Dec/post00001.htm" /><updated>2009-12-03T08:13:30Z</updated><content type="text/plain"><![CDATA[<pre id="body">
<a name="start10" accesskey="j" id="start10"></a>Hi all,

I'm trying <a title="How To Build XML Schemas" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/videos/xmlschema1/xmlschema1.html">to define two-level layered schema</a> - one with generic &quot;system&quot;
model, second with specific &quot;application&quot; model.

When trying to expose application data using generic system model elements
specified by using xsi:type attribute referring to application model types,
I've encountered some asymetry in treating it while validating data.

My example is somehow simplified so as to reflect the issue from topic.

Let's start with system schema, sys.xsd:

&lt;schema 
    targetNamespace=&quot;http://www.org.com/SYS&quot; 
    xmlns:sys=&quot;http://www.org.com/SYS&quot;
    xmlns:xsd=&quot;http://www.<a title="w3" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/w3c/">w3</a>.org/2001/XMLSchema&quot; 
    xmlns=&quot;http://www.w3.org/2001/XMLSchema&quot;
    elementFormDefault=&quot;qualified&quot;&gt;

    &lt;element name=&quot;Entity&quot; type=&quot;sys:EntityType&quot;/&gt;
    &lt;complexType name=&quot;EntityType&quot;&gt;
        &lt;sequence minOccurs=&quot;0&quot; maxOccurs=&quot;unbounded&quot;&gt;
            &lt;element ref=&quot;sys:category&quot;/&gt;
        &lt;/sequence&gt;
    &lt;/complexType&gt;

    &lt;element name=&quot;category&quot; type=&quot;sys:CategoryType&quot;/&gt;
    &lt;simpleType name=&quot;CategoryType&quot;&gt;
        &lt;restriction base=&quot;string&quot;/&gt;
    &lt;/simpleType&gt;
    
&lt;/schema&gt;

Now I want to define specific rules for Room derived from Entity by
restriction in app.xsd:

&lt;schema 
    targetNamespace=&quot;http://www.org.com/APP&quot;
    xmlns:app=&quot;http://www.org.com/APP&quot;
    xmlns:sys=&quot;http://www.org.com/SYS&quot; 
    xmlns:xsd=&quot;http://www.w3.org/2001/XMLSchema&quot; 
    xmlns=&quot;http://www.w3.org/2001/XMLSchema&quot; 
    elementFormDefault=&quot;qualified&quot;&gt;

    &lt;import 
        namespace=&quot;http://www.org.com/SYS&quot; 
        schemaLocation=&quot;sys.xsd&quot;/&gt;

    &lt;element name=&quot;Room&quot; type=&quot;app:RoomType&quot; substitutionGroup=&quot;sys:Entity&quot;
/&gt;
    &lt;complexType name=&quot;RoomType&quot;&gt;
        &lt;complexContent&gt;
            &lt;restriction base=&quot;sys:EntityType&quot;&gt;
                &lt;sequence&gt;
                    &lt;element ref=&quot;app:roomCategory&quot;&gt;&lt;/element&gt;
                &lt;/sequence&gt;
            &lt;/restriction&gt;
        &lt;/complexContent&gt;
    &lt;/complexType&gt;

    &lt;element name=&quot;roomCategory&quot; type=&quot;app:RoomCategoryType&quot;
substitutionGroup=&quot;sys:category&quot;/&gt;
    &lt;simpleType name=&quot;RoomCategoryType&quot;&gt;
        &lt;restriction base=&quot;sys:CategoryType&quot;&gt;
            &lt;enumeration value=&quot;living&quot;&gt;&lt;/enumeration&gt;
            &lt;enumeration value=&quot;bedroom&quot;&gt;&lt;/enumeration&gt;
            &lt;enumeration value=&quot;kitchen&quot;&gt;&lt;/enumeration&gt;
        &lt;/restriction&gt;
    &lt;/simpleType&gt;
    
&lt;/schema&gt;

Now I can write data using application model:

&lt;Room&gt;
&lt;!-- namespaces omitted for brevity --&gt;
    &lt;roomCategory&gt;living&lt;/roomCategory&gt;
&lt;/Room&gt;

I could write the same data using plain system model, because Room is
derived from Entity by restriction:

&lt;sys:Entity&gt;
&lt;!-- namespaces omitted for brevity --&gt;
    &lt;sys:category&gt;living&lt;/sys:category&gt;
&lt;/sys:Entity1&gt;

The reason for flattening data to system model is to make it understandable
for some low-level processing, whatever it is (i.e. without exact knowledge
on application specifics).

But there are some drawbacks:
- validation can be made only against system schema, not application schema;
- information about actual application types has been stripped out, although
it could be of later use for some high-level processing, whatever it is
(i.e. using knowledge of aplication specifics).

My natural attempt was to use xsi:type attribute.

But it occured that I can write 

&lt;sys:Entity xsi:type=&quot;RoomType&quot;&gt;
&lt;!-- namespaces omitted for brevity --&gt;
    &lt;roomCategory&gt;living&lt;/roomCategory&gt;
&lt;/sys:Entity1&gt;

OR

&lt;sys:Entity&gt;
&lt;!-- namespaces omitted for brevity --&gt;
    &lt;sys:category xsi:type=RoomCategoryType&quot;&gt;living&lt;/sys:category&gt;
&lt;/sys:Entity&gt;

BUT USING xsi:type on both levels is illegal:

&lt;sys:Entity xsi:type=&quot;RoomType&quot;&gt;
&lt;!-- namespaces omitted for brevity --&gt;
    &lt;sys:category xsi:type=RoomCategoryType&quot;&gt;living&lt;/sys:category&gt;
&lt;/sys:Entity1&gt;

It seems that xsi:type &quot;works&quot; inwards, forcing inner content of element to
be validated along referred type. But in the same time, it does not work
outwards, i.e. inner element is not exposed as referred type - element name
is interpreted explicitly instead.

This is what I assume some drawback in how XML schema works, and causes my
concept for exposing data using layered schemas to be illegal.

I wonder if somebody could explain if there are some valid reasons for
hiding xsi:type attribute referred from inner elements to their parent
elements.



-- 
View this message in context: http://old.nabble.com/Why-xsi%3Atype-works-only-inwards%2C-not-outwards--tp26628621p26628621.html
Sent from the w3.org - xmlschema-dev mailing list archive at Nabble.com.
</pre>
<span id="received"><dfn>Received on</dfn> Thursday,  3 December 2009 18:30:11 GMT</span>
</div>
]]></content></entry><entry><title>RE: Extending Types </title><id>http://xsd.stylusstudio.com/2009Dec/post09000.htm</id><link rel="alternate" type="text/html" href="http://xsd.stylusstudio.com/2009Dec/post09000.htm" /><updated>2009-12-02T12:55:56Z</updated><content type="text/plain"><![CDATA[<pre id="body">
<a name="start9" accesskey="j" id="start9"></a>FWIW, sounds like a <a title="use case" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xquery/use_cases.html">use case</a> for typed wildcards [1] if they existed.

&lt;<a title="xs:complexType" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema_editor.html">xs:complexType</a> name=&quot;MyMessageType&quot;&gt;
    &lt;xs:sequence&gt;
        &lt;xs:element name=&quot;Header&quot;&gt;
            &lt;xs:complexType&gt;
                &lt;xs:sequence&gt;
                    &lt;xs:element name=&quot;Who&quot; type=&quot;xs:string&quot;&gt;&lt;/xs:element&gt;
                    &lt;xs:element name=&quot;When&quot; type=&quot;xs:string&quot;&gt;&lt;/xs:element&gt;
                &lt;/xs:sequence&gt;
            &lt;/xs:complexType&gt;
        &lt;/xs:element&gt;
        &lt;xs:any type=&quot;BaseBusinessContent&quot;/&gt;
    &lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;

&lt;xs:complexType name=&quot;BaseBusinessContent&quot;&gt;
   &lt;xs:sequence&gt;
       &lt;xs:element name=&quot;Code&quot; type=&quot;xs:string&quot;&gt;&lt;/xs:element&gt;
       &lt;xs:element name=&quot;Description&quot; type=&quot;xs:string&quot;&gt;&lt;/xs:element&gt;
   &lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;

xan

[1] http://www.<a title="w3" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/w3c/">w3</a>.org/Bugs/Public/show_bug.cgi?id=2866


-----Original Message-----
From: <a href="mailto:xmlschema-dev-request&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;?Subject=RE%3A%20Extending%20Types&amp;In-Reply-To=%253C17641EFB588CA34999190486A21266430517B73EC2%40mercmbx10.na.sas.com%253E&amp;References=%253C17641EFB588CA34999190486A21266430517B73EC2%40mercmbx10.na.sas.com%253E">xmlschema-dev-request&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;</a> [mailto:<a href="mailto:xmlschema-dev-request&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;?Subject=RE%3A%20Extending%20Types&amp;In-Reply-To=%253C17641EFB588CA34999190486A21266430517B73EC2%40mercmbx10.na.sas.com%253E&amp;References=%253C17641EFB588CA34999190486A21266430517B73EC2%40mercmbx10.na.sas.com%253E">xmlschema-dev-request&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;</a>] On Behalf Of Flavio Cordova
Sent: Tuesday, December 01, 2009 4:25 PM
To: <a href="mailto:xmlschema-dev&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;?Subject=RE%3A%20Extending%20Types&amp;In-Reply-To=%253C17641EFB588CA34999190486A21266430517B73EC2%40mercmbx10.na.sas.com%253E&amp;References=%253C17641EFB588CA34999190486A21266430517B73EC2%40mercmbx10.na.sas.com%253E">xmlschema-dev&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;</a>
Subject: Re: Extending Types

I may have found another way, although is not exactly what I'm looking for..

In definition.<a title="xsd" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema.html">xsd</a>

&lt;xs:complexType name=&quot;MyMessageType&quot;&gt;
    &lt;xs:sequence&gt;
        &lt;xs:element name=&quot;Header&quot;&gt;
            &lt;xs:complexType&gt;
                &lt;xs:sequence&gt;
                    &lt;xs:element name=&quot;Who&quot; type=&quot;xs:string&quot;&gt;&lt;/xs:element&gt;
                    &lt;xs:element name=&quot;When&quot; type=&quot;xs:string&quot;&gt;&lt;/xs:element&gt;
                &lt;/xs:sequence&gt;
            &lt;/xs:complexType&gt;
        &lt;/xs:element&gt;
        &lt;xs:element ref=&quot;AbstractBusinessContent&quot;&gt;&lt;/xs:element&gt;
    &lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;

&lt;xs:element name=&quot;AbstractBusinessContent&quot; abstract=&quot;true&quot;&gt;&lt;/xs:element&gt;
&lt;xs:element name=&quot;MyMsg&quot; type=&quot;MyMessage&quot;&gt;&lt;/xs:element&gt;

Notice that I have create a reference element of MyMessage
(ref=&quot;AbstractBusinessContent&quot;) and defined this element as abstract
(although, &quot;abstract&quot; seems to be useless, it avoids that the user
could use this element in the XML).

Then in child.xsd:
&lt;xs:include schemaLocation=&quot;definition.xsd&quot;&gt;&lt;/xs:include&gt;
&lt;xs:complexType name=&quot;BusinessContent&quot;&gt;
   &lt;xs:sequence&gt;
       &lt;xs:element name=&quot;Code&quot; type=&quot;xs:string&quot;&gt;&lt;/xs:element&gt;
       &lt;xs:element name=&quot;Description&quot; type=&quot;xs:string&quot;&gt;&lt;/xs:element&gt;
   &lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;

&lt;xs:element name=&quot;BusinessContent&quot; type=&quot;BusinessContent&quot;
substitutionGroup=&quot;AbstractBusinessContent&quot;&gt;&lt;/xs:element&gt;

Notice here that I just defined another complexType (BusinessContent)
and created an element using substituitionGroup. That means I could
use it instead of AbstractBusinessContent.

Why it's not perfect: Now I can't pre-define any content for BusinessContent...

I'm feeling much more comfortable, yet not satisfied... I mean, I can
solve my problem just setting GenericInformation a sibling of
BusinessContent, but I still think there should be a way to make
abstract types do the job.. :(


On Tue, Dec 1, 2009 at 5:27 PM, Flavio Cordova &lt;<a href="mailto:flavio.cordova&#x40;&#0103;&#0109;&#0097;&#0105;&#0108;&#0046;&#0099;&#0111;&#0109;?Subject=RE%3A%20Extending%20Types&amp;In-Reply-To=%253C17641EFB588CA34999190486A21266430517B73EC2%40mercmbx10.na.sas.com%253E&amp;References=%253C17641EFB588CA34999190486A21266430517B73EC2%40mercmbx10.na.sas.com%253E">flavio.cordova&#x40;&#0103;&#0109;&#0097;&#0105;&#0108;&#0046;&#0099;&#0111;&#0109;</a>&gt; wrote:
&gt; You mean something like this ?
&gt;
&gt; &lt;xs:complexType name=&quot;AbstractBusinessContentType&quot;&gt; &lt;!-- No abstract
&gt; attribute anymore --&gt;
&gt;   &lt;xs:sequence&gt;
&gt;     &lt;xs:group ref=&quot;BusinessContentGroup&quot;&gt;&lt;/xs:group&gt;
&gt;   &lt;/xs:sequence&gt;
&gt; &lt;/xs:complexType&gt;
&gt;
&gt; Then I leave definition.xsd with no definition for
&gt; BusinessContentGroup and only define it in item.xsd, changing
&gt; xs:redefine to xs:include, right ?
&gt; That works but then the parent XSD becomes invalid, since the group
&gt; isn't defined there, right ?
&gt;
&gt; I'm not comfortable with this solution (although I will use it if
&gt; nothing betters comes up :D).. Is there any other ?
&gt; I know it could sound a little picky, but I seems to me abstract
&gt; should do the work and I'm just forgetting something...
&gt;
&gt;
&gt;
&gt;
&gt; On Tue, Dec 1, 2009 at 5:00 PM, Michael Kay &lt;<a href="mailto:mike&#x40;&#0115;&#0097;&#0120;&#0111;&#0110;&#0105;&#0099;&#0097;&#0046;&#0099;&#0111;&#0109;?Subject=RE%3A%20Extending%20Types&amp;In-Reply-To=%253C17641EFB588CA34999190486A21266430517B73EC2%40mercmbx10.na.sas.com%253E&amp;References=%253C17641EFB588CA34999190486A21266430517B73EC2%40mercmbx10.na.sas.com%253E">mike&#x40;&#0115;&#0097;&#0120;&#0111;&#0110;&#0105;&#0099;&#0097;&#0046;&#0099;&#0111;&#0109;</a>&gt; wrote:
&gt;&gt;&gt;
&gt;&gt;&gt; Actually, in my case, I need to create a complexType that
&gt;&gt;&gt; will be extended by other people, just overwriting (or
&gt;&gt;&gt; &quot;implementing&quot;) the BusinessContent tag.
&gt;&gt;
&gt;&gt; I think the simplest solution is a low-tech one: have your type refer to a
&gt;&gt; named model group called BusinessContentGroup which you define in a separate
&gt;&gt; schema document, which people can edit.
&gt;&gt;
&gt;&gt; OK that has disadvantages, for example it makes it difficult for different
&gt;&gt; extensions of the schema to coexist, but those disadvantages apply to nearly
&gt;&gt; all other techniques as well.
&gt;&gt;
&gt;&gt; Regards,
&gt;&gt;
&gt;&gt; Michael Kay
&gt;&gt; http://www.saxonica.com/
&gt;&gt; http://twitter.com/michaelhkay
&gt;&gt;
&gt;&gt;
&gt;
</pre>
<span id="received"><dfn>Received on</dfn> Wednesday,  2 December 2009 17:56:44 GMT</span>
</div>
]]></content></entry><entry><title>Re: Extending Types </title><id>http://xsd.stylusstudio.com/2009Dec/post08000.htm</id><link rel="alternate" type="text/html" href="http://xsd.stylusstudio.com/2009Dec/post08000.htm" /><updated>2009-12-01T19:25:26Z</updated><content type="text/plain"><![CDATA[<pre id="body">
<a name="start8" accesskey="j" id="start8"></a>I may have found another way, although is not exactly what I'm looking for..

In definition.<a title="xsd" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema.html">xsd</a>

&lt;<a title="xs:complexType" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema_editor.html">xs:complexType</a> name=&quot;MyMessageType&quot;&gt;
    &lt;xs:sequence&gt;
        &lt;xs:element name=&quot;Header&quot;&gt;
            &lt;xs:complexType&gt;
                &lt;xs:sequence&gt;
                    &lt;xs:element name=&quot;Who&quot; type=&quot;xs:string&quot;&gt;&lt;/xs:element&gt;
                    &lt;xs:element name=&quot;When&quot; type=&quot;xs:string&quot;&gt;&lt;/xs:element&gt;
                &lt;/xs:sequence&gt;
            &lt;/xs:complexType&gt;
        &lt;/xs:element&gt;
        &lt;xs:element ref=&quot;AbstractBusinessContent&quot;&gt;&lt;/xs:element&gt;
    &lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;

&lt;xs:element name=&quot;AbstractBusinessContent&quot; abstract=&quot;true&quot;&gt;&lt;/xs:element&gt;
&lt;xs:element name=&quot;MyMsg&quot; type=&quot;MyMessage&quot;&gt;&lt;/xs:element&gt;

Notice that I have create a reference element of MyMessage
(ref=&quot;AbstractBusinessContent&quot;) and defined this element as abstract
(although, &quot;abstract&quot; seems to be useless, it avoids that the user
could use this element in the <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">XML</a>).

Then in child.xsd:
&lt;xs:include schemaLocation=&quot;definition.xsd&quot;&gt;&lt;/xs:include&gt;
&lt;xs:complexType name=&quot;BusinessContent&quot;&gt;
   &lt;xs:sequence&gt;
       &lt;xs:element name=&quot;Code&quot; type=&quot;xs:string&quot;&gt;&lt;/xs:element&gt;
       &lt;xs:element name=&quot;Description&quot; type=&quot;xs:string&quot;&gt;&lt;/xs:element&gt;
   &lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;

&lt;xs:element name=&quot;BusinessContent&quot; type=&quot;BusinessContent&quot;
substitutionGroup=&quot;AbstractBusinessContent&quot;&gt;&lt;/xs:element&gt;

Notice here that I just defined another complexType (BusinessContent)
and created an element using substituitionGroup. That means I could
use it instead of AbstractBusinessContent.

Why it's not perfect: Now I can't pre-define any content for BusinessContent...

I'm feeling much more comfortable, yet not satisfied... I mean, I can
solve my problem just setting GenericInformation a sibling of
BusinessContent, but I still think there should be a way to make
abstract types do the <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/jobs.html">job</a>.. :(


On Tue, Dec 1, 2009 at 5:27 PM, Flavio Cordova &lt;<a href="mailto:flavio.cordova&#x40;&#0103;&#0109;&#0097;&#0105;&#0108;&#0046;&#0099;&#0111;&#0109;?Subject=Re%3A%20Extending%20Types&amp;In-Reply-To=%253C5608fb200912011325o4b1c4a62l886135a039ffb1b7%40mail.gmail.com%253E&amp;References=%253C5608fb200912011325o4b1c4a62l886135a039ffb1b7%40mail.gmail.com%253E">flavio.cordova&#x40;&#0103;&#0109;&#0097;&#0105;&#0108;&#0046;&#0099;&#0111;&#0109;</a>&gt; wrote:
&gt; You mean something like this ?
&gt;
&gt; &lt;xs:complexType name=&quot;AbstractBusinessContentType&quot;&gt; &lt;!-- No abstract
&gt; attribute anymore --&gt;
&gt;   &lt;xs:sequence&gt;
&gt;     &lt;xs:group ref=&quot;BusinessContentGroup&quot;&gt;&lt;/xs:group&gt;
&gt;   &lt;/xs:sequence&gt;
&gt; &lt;/xs:complexType&gt;
&gt;
&gt; Then I leave definition.xsd with no definition for
&gt; BusinessContentGroup and only define it in item.xsd, changing
&gt; xs:redefine to xs:include, right ?
&gt; That works but then the parent XSD becomes invalid, since the group
&gt; isn't defined there, right ?
&gt;
&gt; I'm not comfortable with this solution (although I will use it if
&gt; nothing betters comes up :D).. Is there any other ?
&gt; I know it could sound a little picky, but I seems to me abstract
&gt; should do the work and I'm just forgetting something...
&gt;
&gt;
&gt;
&gt;
&gt; On Tue, Dec 1, 2009 at 5:00 PM, <a title="Interview Michael Kay - W3C XML Member and Founder of Saxonica" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/michael_kay.html">Michael Kay</a> &lt;<a href="mailto:mike&#x40;&#0115;&#0097;&#0120;&#0111;&#0110;&#0105;&#0099;&#0097;&#0046;&#0099;&#0111;&#0109;?Subject=Re%3A%20Extending%20Types&amp;In-Reply-To=%253C5608fb200912011325o4b1c4a62l886135a039ffb1b7%40mail.gmail.com%253E&amp;References=%253C5608fb200912011325o4b1c4a62l886135a039ffb1b7%40mail.gmail.com%253E">mike&#x40;&#0115;&#0097;&#0120;&#0111;&#0110;&#0105;&#0099;&#0097;&#0046;&#0099;&#0111;&#0109;</a>&gt; wrote:
&gt;&gt;&gt;
&gt;&gt;&gt; Actually, in my case, I need to create a complexType that
&gt;&gt;&gt; will be extended by other people, just overwriting (or
&gt;&gt;&gt; &quot;implementing&quot;) the BusinessContent tag.
&gt;&gt;
&gt;&gt; I think the simplest solution is a low-tech one: have your type refer to a
&gt;&gt; named model group called BusinessContentGroup which you define in a separate
&gt;&gt; schema document, which people can edit.
&gt;&gt;
&gt;&gt; OK that has disadvantages, for example it makes it difficult for different
&gt;&gt; extensions of the schema to coexist, but those disadvantages apply to nearly
&gt;&gt; all other techniques as well.
&gt;&gt;
&gt;&gt; Regards,
&gt;&gt;
&gt;&gt; Michael Kay
&gt;&gt; http://www.saxonica.com/
&gt;&gt; http://twitter.com/michaelhkay
&gt;&gt;
&gt;&gt;
&gt;
</pre>
<span id="received"><dfn>Received on</dfn> Tuesday,  1 December 2009 21:26:00 GMT</span>
</div>
]]></content></entry><entry><title>RE: Extending Types </title><id>http://xsd.stylusstudio.com/2009Dec/post06000.htm</id><link rel="alternate" type="text/html" href="http://xsd.stylusstudio.com/2009Dec/post06000.htm" /><updated>2009-12-01T19:00:48Z</updated><content type="text/plain"><![CDATA[<pre id="body">
<a name="start6" accesskey="j" id="start6"></a>&gt; 
&gt; Actually, in my case, I need to create a complexType that 
&gt; will be extended by other people, just overwriting (or 
&gt; &quot;implementing&quot;) the BusinessContent tag. 

I think the simplest solution is a low-tech one: have your type refer to a
named model group called BusinessContentGroup which you <a title="XML Schema Tutorial" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/videos/xmlschema1/xmlschema1.html">define in a separate
schema</a> document, which people can edit.

OK that has disadvantages, for example it makes it difficult for different
extensions of the schema to coexist, but those disadvantages apply to nearly
all other techniques as well.

Regards,

<a title="Interview Michael Kay - W3C XML Member and Founder of Saxonica" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/michael_kay.html">Michael Kay</a>
http://www.saxonica.com/
http://twitter.com/michaelhkay 
</pre>
<span id="received"><dfn>Received on</dfn> Tuesday,  1 December 2009 19:01:17 GMT</span>
</div>
]]></content></entry><entry><title>RE: Extending Types </title><id>http://xsd.stylusstudio.com/2009Dec/post04000.htm</id><link rel="alternate" type="text/html" href="http://xsd.stylusstudio.com/2009Dec/post04000.htm" /><updated>2009-12-01T18:20:02Z</updated><content type="text/plain"><![CDATA[<pre id="body">
<a name="start4" accesskey="j" id="start4"></a>Your reply was off-list, I'm copying it back to the list.

The problem I think is that when you extend a type, the extension always
goes at the end.

Regards,

<a title="Interview Michael Kay - W3C XML Member and Founder of Saxonica" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/michael_kay.html">Michael Kay</a>
http://www.saxonica.com/
http://twitter.com/michaelhkay 

&gt; -----Original Message-----
&gt; From: Flavio Cordova [mailto:<a href="mailto:flavio.cordova&#x40;&#0103;&#0109;&#0097;&#0105;&#0108;&#0046;&#0099;&#0111;&#0109;?Subject=RE%3A%20Extending%20Types&amp;In-Reply-To=%253C39D4E8AADC594EBEB665037342D83871%40Sealion%253E&amp;References=%253C39D4E8AADC594EBEB665037342D83871%40Sealion%253E">flavio.cordova&#x40;&#0103;&#0109;&#0097;&#0105;&#0108;&#0046;&#0099;&#0111;&#0109;</a>] 
&gt; Sent: 01 December 2009 18:01
&gt; To: Michael Kay
&gt; Subject: Re: Extending Types
&gt; 
&gt; Well.. I have changed some things but that's how it looks like now:
&gt; 
&gt; In definition.<a title="xsd" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema.html">xsd</a>
&gt; 
&gt; DEFINITION:
&gt;     &lt;<a title="xs:complexType" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema_editor.html">xs:complexType</a> name=&quot;AbstractBusinessContentType&quot; 
&gt; abstract=&quot;true&quot;&gt;
&gt;     	&lt;xs:sequence&gt;
&gt;     		&lt;xs:element name=&quot;CustomInformation&quot;&gt;
&gt;                                      ....
&gt;     		&lt;/xs:element&gt;
&gt;     	&lt;/xs:sequence&gt;
&gt;     &lt;/xs:complexType&gt;
&gt; 
&gt; ELEMENT:
&gt; &lt;xs:element name=&quot;BusinessContent&quot;
&gt; type=&quot;AbstractBusinessContentType&quot;&gt;&lt;/xs:element&gt;
&gt; 
&gt; 
&gt; in item.xsd, I have this:
&gt; 
&gt; 	&lt;xs:redefine schemaLocation=&quot;../definition.xsd&quot;&gt;
&gt; 		&lt;xs:complexType name=&quot;AbstractBusinessContentType&quot;&gt;
&gt; 			&lt;xs:complexContent&gt;
&gt; 				&lt;xs:extension 
&gt; base=&quot;AbstractBusinessContentType&quot;&gt;
&gt; 					&lt;xs:sequence&gt;
&gt; 						&lt;xs:element 
&gt; name=&quot;Code&quot; type=&quot;xs:string&quot;&gt;&lt;/xs:element&gt;
&gt; 						&lt;xs:element 
&gt; name=&quot;Description&quot; type=&quot;xs:string&quot;&gt;&lt;/xs:element&gt;
&gt; 					&lt;/xs:sequence&gt;
&gt; 				&lt;/xs:extension&gt;
&gt; 			&lt;/xs:complexContent&gt;
&gt; 		&lt;/xs:complexType&gt;
&gt; 	&lt;/xs:redefine&gt;
&gt; 
&gt; But it doesn't work too.. When I create the XML the validator 
&gt; shows that Code is not a valid child for BusinessContent.
&gt; 
&gt;     &lt;BusinessContent&gt;
&gt;       &lt;Code&gt;UN&lt;/Code&gt; &lt;!-- ### Invalid child ### --&gt;
&gt;       &lt;Description&gt;Unidade&lt;/Description&gt;
&gt;       &lt;CustomInformation&gt;
&gt;       	&lt;Table name=&quot;labInfo&quot;&gt;
&gt;       		&lt;Record&gt;
&gt;       			&lt;Field name=&quot;quanticMass&quot;&gt;120&lt;/Field&gt;
&gt;       			&lt;Field 
&gt; name=&quot;fusionMethod&quot;&gt;Nuclear&lt;/Field&gt;
&gt;       		&lt;/Record&gt;
&gt;       	&lt;/Table&gt;
&gt;       &lt;/CustomInformation&gt;
&gt;     &lt;/BusinessContent&gt;
&gt; 
&gt; Talking about compositions or inheritance, I don't know 
&gt; exactly how it would work (I mean, I know the concepts, but I 
&gt; really don't what it would do with my xml.. :D)
&gt; 
&gt; I'll try to find something about named model groups to see if 
&gt; I could use them...
&gt; 
&gt; 
&gt; On Tue, Dec 1, 2009 at 12:00 PM, Michael Kay 
&gt; &lt;<a href="mailto:mike&#x40;&#0115;&#0097;&#0120;&#0111;&#0110;&#0105;&#0099;&#0097;&#0046;&#0099;&#0111;&#0109;?Subject=RE%3A%20Extending%20Types&amp;In-Reply-To=%253C39D4E8AADC594EBEB665037342D83871%40Sealion%253E&amp;References=%253C39D4E8AADC594EBEB665037342D83871%40Sealion%253E">mike&#x40;&#0115;&#0097;&#0120;&#0111;&#0110;&#0105;&#0099;&#0097;&#0046;&#0099;&#0111;&#0109;</a>&gt; wrote:
&gt; &gt;&gt; I have an XML that looks like this:
&gt; &gt;&gt;
&gt; &gt;&gt; &lt;MyMessage&gt;
&gt; &gt;&gt;   &lt;HeaderInfo&gt;
&gt; &gt;&gt;      ....
&gt; &gt;&gt;   &lt;/HeaderInfo&gt;
&gt; &gt;&gt;   &lt;BusinessContent&gt;
&gt; &gt;&gt;     #someSpecificInformation# &lt;!-- This will be defined in 
&gt; a &quot;child&quot; 
&gt; &gt;&gt; XSD
&gt; &gt;&gt;     &lt;GenericInfo&gt;
&gt; &gt;&gt;        &lt;information&gt;a&lt;/information&gt;
&gt; &gt;&gt;     &lt;/GenericInfo&gt;
&gt; &gt;&gt;   &lt;/BusinessContent&gt;
&gt; &gt;&gt; &lt;/MyMessage&gt;
&gt; &gt;&gt;
&gt; &gt;&gt; In a file called definition.xsd, I defined the whole structure, 
&gt; &gt;&gt; including the BusinessContent ComplexType.. Then, I 
&gt; defined another 
&gt; &gt;&gt; XSD, called item.xsd, where I'd like to define only the content of 
&gt; &gt;&gt; the BusinessContent, so I did something like this:
&gt; &gt;&gt;
&gt; &gt;&gt; &lt;xs:include schemaLocation=&quot;definition.xsd&quot;&gt;&lt;/xs:include&gt;
&gt; &gt;&gt; &lt;xs:complexType name=&quot;BusinessContentTypeImpl&quot;&gt;
&gt; &gt;&gt;   &lt;xs:complexContent&gt;
&gt; &gt;&gt;     &lt;xs:extension base=&quot;GenericBusinessContentType&quot;&gt;
&gt; &gt;&gt;       &lt;xs:sequence&gt;
&gt; &gt;&gt;         &lt;xs:element name=&quot;Code&quot; type=&quot;xs:string&quot;&gt;&lt;/xs:element&gt;
&gt; &gt;&gt;         &lt;xs:element name=&quot;Description&quot; 
&gt; type=&quot;xs:string&quot;&gt;&lt;/xs:element&gt;
&gt; &gt;&gt;       &lt;/xs:sequence&gt;
&gt; &gt;&gt;     &lt;/xs:extension&gt;
&gt; &gt;&gt;   &lt;/xs:complexContent&gt;
&gt; &gt;&gt; &lt;/xs:complexType&gt;
&gt; &gt;
&gt; &gt; What does the element declaration for BusinessContent look 
&gt; like? Is it 
&gt; &gt; using the GenericBusinessContentType or 
&gt; BusinessContentTypeImpl? You 
&gt; &gt; can only use the BusinessContentTypeImpl content model if 
&gt; the type is 
&gt; &gt; declared as BusinessContentTypeImpl either in the element 
&gt; declaration, 
&gt; &gt; or in an xsi:type attribute in the instance.
&gt; &gt;
&gt; &gt; Have you considered using named model groups instead? As with any 
&gt; &gt; object-oriented design, people sometimes overlook that 
&gt; composition is 
&gt; &gt; more powerful than inheritance.
&gt; &gt;
&gt; &gt; Regards,
&gt; &gt;
&gt; &gt; Michael Kay
&gt; &gt; http://www.saxonica.com/
&gt; &gt; http://twitter.com/michaelhkay
&gt; &gt;
&gt; &gt;
&gt; &gt;&gt;
&gt; &gt;&gt; When I create an XML (adding tags Code and Description), I get an 
&gt; &gt;&gt; error because tags Code and Description are not valid children for 
&gt; &gt;&gt; BusinessContent, although I've extended it...
&gt; &gt;&gt;
&gt; &gt;&gt; I'd also like to force extension of BusinessContent. Then 
&gt; I tried to 
&gt; &gt;&gt; use the abstract attribute, but then I couldn't add the 
&gt; &lt;GenericInfo&gt; 
&gt; &gt;&gt; child...
&gt; &gt;&gt;
&gt; &gt;&gt; So, my questions are:
&gt; &gt;&gt; 1) how should I extend BusinessContent
&gt; &gt;&gt; (GenericBusinessContentType) so I could keep the current elements 
&gt; &gt;&gt; (GenericInfo) add more elements..
&gt; &gt;&gt; 2) how could I force a &quot;child&quot; xsd file to import the 
&gt; definitions.xsd 
&gt; &gt;&gt; and extend BusinessContent.
&gt; &gt;&gt;
&gt; &gt;&gt; Thanks !
&gt; &gt;&gt;
&gt; &gt;&gt;
&gt; &gt;
&gt; &gt;
</pre>
<span id="received"><dfn>Received on</dfn> Tuesday,  1 December 2009 18:20:34 GMT</span>
</div>
]]></content></entry><entry><title>Re: Extending Types </title><id>http://xsd.stylusstudio.com/2009Dec/post07000.htm</id><link rel="alternate" type="text/html" href="http://xsd.stylusstudio.com/2009Dec/post07000.htm" /><updated>2009-12-01T17:27:16Z</updated><content type="text/plain"><![CDATA[<pre id="body">
<a name="start7" accesskey="j" id="start7"></a>You mean something like this ?

&lt;<a title="xs:complexType" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema_editor.html">xs:complexType</a> name=&quot;AbstractBusinessContentType&quot;&gt; &lt;!-- No abstract
attribute anymore --&gt;
   &lt;xs:sequence&gt;
     &lt;xs:group ref=&quot;BusinessContentGroup&quot;&gt;&lt;/xs:group&gt;
   &lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;

Then I leave definition.<a title="xsd" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema.html">xsd</a> with no definition for
BusinessContentGroup and only define it in item.xsd, changing
xs:redefine to xs:include, right ?
That works but then the parent XSD becomes invalid, since the group
isn't defined there, right ?

I'm not comfortable with this solution (although I will use it if
nothing betters comes up :D).. Is there any other ?
I know it could sound a little picky, but I seems to me abstract
should do the work and I'm just forgetting something...




On Tue, Dec 1, 2009 at 5:00 PM, <a title="Interview Michael Kay - W3C XML Member and Founder of Saxonica" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/michael_kay.html">Michael Kay</a> &lt;<a href="mailto:mike&#x40;&#0115;&#0097;&#0120;&#0111;&#0110;&#0105;&#0099;&#0097;&#0046;&#0099;&#0111;&#0109;?Subject=Re%3A%20Extending%20Types&amp;In-Reply-To=%253C5608fb200912011127mb8a2cbcl43aadbd021526dda%40mail.gmail.com%253E&amp;References=%253C5608fb200912011127mb8a2cbcl43aadbd021526dda%40mail.gmail.com%253E">mike&#x40;&#0115;&#0097;&#0120;&#0111;&#0110;&#0105;&#0099;&#0097;&#0046;&#0099;&#0111;&#0109;</a>&gt; wrote:
&gt;&gt;
&gt;&gt; Actually, in my case, I need to create a complexType that
&gt;&gt; will be extended by other people, just overwriting (or
&gt;&gt; &quot;implementing&quot;) the BusinessContent tag.
&gt;
&gt; I think the simplest solution is a low-tech one: have your type refer to a
&gt; named model group called BusinessContentGroup which you define in a separate
&gt; <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema_editor.html">schema document</a>, which people can edit.
&gt;
&gt; OK that has disadvantages, for example it makes it difficult for different
&gt; extensions of the schema to coexist, but those disadvantages apply to nearly
&gt; all other techniques as well.
&gt;
&gt; Regards,
&gt;
&gt; Michael Kay
&gt; http://www.saxonica.com/
&gt; http://twitter.com/michaelhkay
&gt;
&gt;
</pre>
<span id="received"><dfn>Received on</dfn> Tuesday,  1 December 2009 19:27:57 GMT</span>
</div>
]]></content></entry><entry><title>Fwd: Extending Types </title><id>http://xsd.stylusstudio.com/2009Dec/post05000.htm</id><link rel="alternate" type="text/html" href="http://xsd.stylusstudio.com/2009Dec/post05000.htm" /><updated>2009-12-01T16:21:01Z</updated><content type="text/plain"><![CDATA[<pre id="body">
<a name="start5" accesskey="j" id="start5"></a>I'm considering this (http://www.w3schools.com/<a title="Schema" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema.html">Schema</a>/el_group.asp) as
a source for named groups.. :-)

In this case, I understand that in the &quot;child&quot; xsd file I would
compound a new complexType using parts already defined in
definitions.xsd, right ?

Actually, in my case, I need to create a complexType that will be
extended by other people, just overwriting (or &quot;implementing&quot;) the
BusinessContent tag. I don't want people have to care about how to
assemble parts to create a correct message.. I just want them to focus
on the specialized part...
However, I<a title="DOM XML" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/dom.html"> have some freedom</a> to change the structure... for example, I
could move the CustomInformation out of BusinessContent, if it could
make things easier.. but I think keeping it would be more
challenging.. :)

Am I too high ? :)

---------- Forwarded message ----------
From: Flavio Cordova &lt;<a href="mailto:flavio.cordova&#x40;&#0103;&#0109;&#0097;&#0105;&#0108;&#0046;&#0099;&#0111;&#0109;?Subject=Re%3A%20Fwd%3A%20Extending%20Types&amp;In-Reply-To=%253C5608fb200912011021n62c618c3yb230b8c5bb75f170%40mail.gmail.com%253E&amp;References=%253C5608fb200912011021n62c618c3yb230b8c5bb75f170%40mail.gmail.com%253E">flavio.cordova&#x40;&#0103;&#0109;&#0097;&#0105;&#0108;&#0046;&#0099;&#0111;&#0109;</a>&gt;
Date: Tue, Dec 1, 2009 at 4:00 PM
Subject: Re: Extending Types
To: <a title="Interview Michael Kay - W3C XML Member and Founder of Saxonica" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/michael_kay.html">Michael Kay</a> &lt;<a href="mailto:mike&#x40;&#0115;&#0097;&#0120;&#0111;&#0110;&#0105;&#0099;&#0097;&#0046;&#0099;&#0111;&#0109;?Subject=Re%3A%20Fwd%3A%20Extending%20Types&amp;In-Reply-To=%253C5608fb200912011021n62c618c3yb230b8c5bb75f170%40mail.gmail.com%253E&amp;References=%253C5608fb200912011021n62c618c3yb230b8c5bb75f170%40mail.gmail.com%253E">mike&#x40;&#0115;&#0097;&#0120;&#0111;&#0110;&#0105;&#0099;&#0097;&#0046;&#0099;&#0111;&#0109;</a>&gt;


Well.. I have changed some things but that's how it looks like now:

In definition.xsd

DEFINITION:
   &lt;<a title="xs:complexType" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema_editor.html">xs:complexType</a> name=&quot;AbstractBusinessContentType&quot; abstract=&quot;true&quot;&gt;
       &lt;xs:sequence&gt;
               &lt;xs:element name=&quot;CustomInformation&quot;&gt;
                                    ....
               &lt;/xs:element&gt;
       &lt;/xs:sequence&gt;
   &lt;/xs:complexType&gt;

ELEMENT:
&lt;xs:element name=&quot;BusinessContent&quot;
type=&quot;AbstractBusinessContentType&quot;&gt;&lt;/xs:element&gt;


in item.xsd, I have this:

       &lt;xs:redefine schemaLocation=&quot;../definition.xsd&quot;&gt;
               &lt;xs:complexType name=&quot;AbstractBusinessContentType&quot;&gt;
                       &lt;xs:complexContent&gt;
                               &lt;xs:extension base=&quot;AbstractBusinessContentType&quot;&gt;
                                       &lt;xs:sequence&gt;
                                               &lt;xs:element name=&quot;Code&quot;
type=&quot;xs:string&quot;&gt;&lt;/xs:element&gt;
                                               &lt;xs:element
name=&quot;Description&quot; type=&quot;xs:string&quot;&gt;&lt;/xs:element&gt;
                                       &lt;/xs:sequence&gt;
                               &lt;/xs:extension&gt;
                       &lt;/xs:complexContent&gt;
               &lt;/xs:complexType&gt;
       &lt;/xs:redefine&gt;

But it doesn't work too.. When I create the XML the validator shows
that Code is not a valid child for BusinessContent.

   &lt;BusinessContent&gt;
     &lt;Code&gt;UN&lt;/Code&gt; &lt;!-- ### Invalid child ### --&gt;
     &lt;Description&gt;Unidade&lt;/Description&gt;
     &lt;CustomInformation&gt;
       &lt;Table name=&quot;labInfo&quot;&gt;
               &lt;Record&gt;
                       &lt;Field name=&quot;quanticMass&quot;&gt;120&lt;/Field&gt;
                       &lt;Field name=&quot;fusionMethod&quot;&gt;Nuclear&lt;/Field&gt;
               &lt;/Record&gt;
       &lt;/Table&gt;
     &lt;/CustomInformation&gt;
   &lt;/BusinessContent&gt;

Talking about compositions or inheritance, I don't know exactly how it
would work (I mean, I know the concepts, but I really don't what it
would do with my xml.. :D)

I'll try to find something about named model groups to see if I could
use them...


On Tue, Dec 1, 2009 at 12:00 PM, Michael Kay &lt;<a href="mailto:mike&#x40;&#0115;&#0097;&#0120;&#0111;&#0110;&#0105;&#0099;&#0097;&#0046;&#0099;&#0111;&#0109;?Subject=Re%3A%20Fwd%3A%20Extending%20Types&amp;In-Reply-To=%253C5608fb200912011021n62c618c3yb230b8c5bb75f170%40mail.gmail.com%253E&amp;References=%253C5608fb200912011021n62c618c3yb230b8c5bb75f170%40mail.gmail.com%253E">mike&#x40;&#0115;&#0097;&#0120;&#0111;&#0110;&#0105;&#0099;&#0097;&#0046;&#0099;&#0111;&#0109;</a>&gt; wrote:
&gt;&gt; I have an XML that looks like this:
&gt;&gt;
&gt;&gt; &lt;MyMessage&gt;
&gt;&gt;   &lt;HeaderInfo&gt;
&gt;&gt;      ....
&gt;&gt;   &lt;/HeaderInfo&gt;
&gt;&gt;   &lt;BusinessContent&gt;
&gt;&gt;     #someSpecificInformation# &lt;!-- This will be defined in a
&gt;&gt; &quot;child&quot; XSD
&gt;&gt;     &lt;GenericInfo&gt;
&gt;&gt;        &lt;information&gt;a&lt;/information&gt;
&gt;&gt;     &lt;/GenericInfo&gt;
&gt;&gt;   &lt;/BusinessContent&gt;
&gt;&gt; &lt;/MyMessage&gt;
&gt;&gt;
&gt;&gt; In a file called definition.xsd, I defined the whole
&gt;&gt; structure, including the BusinessContent ComplexType.. Then,
&gt;&gt; I defined another XSD, called item.xsd, where I'd like to
&gt;&gt; define only the content of the BusinessContent, so I did
&gt;&gt; something like this:
&gt;&gt;
&gt;&gt; &lt;xs:include schemaLocation=&quot;definition.xsd&quot;&gt;&lt;/xs:include&gt;
&gt;&gt; &lt;xs:complexType name=&quot;BusinessContentTypeImpl&quot;&gt;
&gt;&gt;   &lt;xs:complexContent&gt;
&gt;&gt;     &lt;xs:extension base=&quot;GenericBusinessContentType&quot;&gt;
&gt;&gt;       &lt;xs:sequence&gt;
&gt;&gt;         &lt;xs:element name=&quot;Code&quot; type=&quot;xs:string&quot;&gt;&lt;/xs:element&gt;
&gt;&gt;         &lt;xs:element name=&quot;Description&quot; type=&quot;xs:string&quot;&gt;&lt;/xs:element&gt;
&gt;&gt;       &lt;/xs:sequence&gt;
&gt;&gt;     &lt;/xs:extension&gt;
&gt;&gt;   &lt;/xs:complexContent&gt;
&gt;&gt; &lt;/xs:complexType&gt;
&gt;
&gt; What does the element declaration for BusinessContent look like? Is it using
&gt; the GenericBusinessContentType or BusinessContentTypeImpl? You can only use
&gt; the BusinessContentTypeImpl content model if the type is declared as
&gt; BusinessContentTypeImpl either in the element declaration, or in an xsi:type
&gt; attribute in the instance.
&gt;
&gt; Have you considered using named model groups instead? As with any
&gt; object-oriented design, people sometimes overlook that composition is more
&gt; powerful than inheritance.
&gt;
&gt; Regards,
&gt;
&gt; Michael Kay
&gt; http://www.saxonica.com/
&gt; http://twitter.com/michaelhkay
&gt;
&gt;
&gt;&gt;
&gt;&gt; When I create an XML (adding tags Code and Description), I
&gt;&gt; get an error because tags Code and Description are not valid
&gt;&gt; children for BusinessContent, although I've extended it...
&gt;&gt;
&gt;&gt; I'd also like to force extension of BusinessContent. Then I
&gt;&gt; tried to use the abstract attribute, but then I couldn't add
&gt;&gt; the &lt;GenericInfo&gt; child...
&gt;&gt;
&gt;&gt; So, my questions are:
&gt;&gt; 1) how should I extend BusinessContent
&gt;&gt; (GenericBusinessContentType) so I could keep the current
&gt;&gt; elements (GenericInfo) add more elements..
&gt;&gt; 2) how could I force a &quot;child&quot; xsd file to import the
&gt;&gt; definitions.xsd and extend BusinessContent.
&gt;&gt;
&gt;&gt; Thanks !
&gt;&gt;
&gt;&gt;
&gt;
&gt;
</pre>
<span id="received"><dfn>Received on</dfn> Tuesday,  1 December 2009 18:21:40 GMT</span>
</div>
]]></content></entry><entry><title>Fwd: Extending Types </title><id>http://xsd.stylusstudio.com/2009Dec/post03000.htm</id><link rel="alternate" type="text/html" href="http://xsd.stylusstudio.com/2009Dec/post03000.htm" /><updated>2009-12-01T16:09:43Z</updated><content type="text/plain"><![CDATA[<pre id="body">
<a name="start3" accesskey="j" id="start3"></a>Sorry.. I didn't send to the list.. :(


---------- Forwarded message ----------
From: Flavio Cordova &lt;<a href="mailto:flavio.cordova&#x40;&#0103;&#0109;&#0097;&#0105;&#0108;&#0046;&#0099;&#0111;&#0109;?Subject=Re%3A%20Fwd%3A%20Extending%20Types&amp;In-Reply-To=%253C5608fb200912011009x1328dc93r7b2da0a6dd1a84c1%40mail.gmail.com%253E&amp;References=%253C5608fb200912011009x1328dc93r7b2da0a6dd1a84c1%40mail.gmail.com%253E">flavio.cordova&#x40;&#0103;&#0109;&#0097;&#0105;&#0108;&#0046;&#0099;&#0111;&#0109;</a>&gt;
Date: Tue, Dec 1, 2009 at 4:00 PM
Subject: Re: Extending Types
To: <a title="Interview Michael Kay - W3C XML Member and Founder of Saxonica" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/michael_kay.html">Michael Kay</a> &lt;<a href="mailto:mike&#x40;&#0115;&#0097;&#0120;&#0111;&#0110;&#0105;&#0099;&#0097;&#0046;&#0099;&#0111;&#0109;?Subject=Re%3A%20Fwd%3A%20Extending%20Types&amp;In-Reply-To=%253C5608fb200912011009x1328dc93r7b2da0a6dd1a84c1%40mail.gmail.com%253E&amp;References=%253C5608fb200912011009x1328dc93r7b2da0a6dd1a84c1%40mail.gmail.com%253E">mike&#x40;&#0115;&#0097;&#0120;&#0111;&#0110;&#0105;&#0099;&#0097;&#0046;&#0099;&#0111;&#0109;</a>&gt;


Well.. I have changed some things but that's how it looks like now:

In definition.<a title="xsd" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema.html">xsd</a>

DEFINITION:
   &lt;<a title="xs:complexType" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema_editor.html">xs:complexType</a> name=&quot;AbstractBusinessContentType&quot; abstract=&quot;true&quot;&gt;
       &lt;xs:sequence&gt;
               &lt;xs:element name=&quot;CustomInformation&quot;&gt;
                                    ....
               &lt;/xs:element&gt;
       &lt;/xs:sequence&gt;
   &lt;/xs:complexType&gt;

ELEMENT:
&lt;xs:element name=&quot;BusinessContent&quot;
type=&quot;AbstractBusinessContentType&quot;&gt;&lt;/xs:element&gt;


in item.xsd, I have this:

       &lt;xs:redefine schemaLocation=&quot;../definition.xsd&quot;&gt;
               &lt;xs:complexType name=&quot;AbstractBusinessContentType&quot;&gt;
                       &lt;xs:complexContent&gt;
                               &lt;xs:extension base=&quot;AbstractBusinessContentType&quot;&gt;
                                       &lt;xs:sequence&gt;
                                               &lt;xs:element name=&quot;Code&quot;
type=&quot;xs:string&quot;&gt;&lt;/xs:element&gt;
                                               &lt;xs:element
name=&quot;Description&quot; type=&quot;xs:string&quot;&gt;&lt;/xs:element&gt;
                                       &lt;/xs:sequence&gt;
                               &lt;/xs:extension&gt;
                       &lt;/xs:complexContent&gt;
               &lt;/xs:complexType&gt;
       &lt;/xs:redefine&gt;

But it doesn't work too.. When I create the XML the validator shows
that Code is not a valid child for BusinessContent.

   &lt;BusinessContent&gt;
     &lt;Code&gt;UN&lt;/Code&gt; &lt;!-- ### Invalid child ### --&gt;
     &lt;Description&gt;Unidade&lt;/Description&gt;
     &lt;CustomInformation&gt;
       &lt;Table name=&quot;labInfo&quot;&gt;
               &lt;Record&gt;
                       &lt;Field name=&quot;quanticMass&quot;&gt;120&lt;/Field&gt;
                       &lt;Field name=&quot;fusionMethod&quot;&gt;Nuclear&lt;/Field&gt;
               &lt;/Record&gt;
       &lt;/Table&gt;
     &lt;/CustomInformation&gt;
   &lt;/BusinessContent&gt;

Talking about compositions or inheritance, I don't know exactly how it
would work (I mean, I know the concepts, but I really don't what it
would do with my xml.. :D)

I'll try to find something about named model groups to see if I could
use them...


On Tue, Dec 1, 2009 at 12:00 PM, Michael Kay &lt;<a href="mailto:mike&#x40;&#0115;&#0097;&#0120;&#0111;&#0110;&#0105;&#0099;&#0097;&#0046;&#0099;&#0111;&#0109;?Subject=Re%3A%20Fwd%3A%20Extending%20Types&amp;In-Reply-To=%253C5608fb200912011009x1328dc93r7b2da0a6dd1a84c1%40mail.gmail.com%253E&amp;References=%253C5608fb200912011009x1328dc93r7b2da0a6dd1a84c1%40mail.gmail.com%253E">mike&#x40;&#0115;&#0097;&#0120;&#0111;&#0110;&#0105;&#0099;&#0097;&#0046;&#0099;&#0111;&#0109;</a>&gt; wrote:
&gt;&gt; I have an XML that looks like this:
&gt;&gt;
&gt;&gt; &lt;MyMessage&gt;
&gt;&gt;   &lt;HeaderInfo&gt;
&gt;&gt;      ....
&gt;&gt;   &lt;/HeaderInfo&gt;
&gt;&gt;   &lt;BusinessContent&gt;
&gt;&gt;     #someSpecificInformation# &lt;!-- This will be defined in a
&gt;&gt; &quot;child&quot; XSD
&gt;&gt;     &lt;GenericInfo&gt;
&gt;&gt;        &lt;information&gt;a&lt;/information&gt;
&gt;&gt;     &lt;/GenericInfo&gt;
&gt;&gt;   &lt;/BusinessContent&gt;
&gt;&gt; &lt;/MyMessage&gt;
&gt;&gt;
&gt;&gt; In a file called definition.xsd, I defined the whole
&gt;&gt; structure, including the BusinessContent ComplexType.. Then,
&gt;&gt; I defined another XSD, called item.xsd, where I'd like to
&gt;&gt; define only the content of the BusinessContent, so I did
&gt;&gt; something like this:
&gt;&gt;
&gt;&gt; &lt;xs:include schemaLocation=&quot;definition.xsd&quot;&gt;&lt;/xs:include&gt;
&gt;&gt; &lt;xs:complexType name=&quot;BusinessContentTypeImpl&quot;&gt;
&gt;&gt;   &lt;xs:complexContent&gt;
&gt;&gt;     &lt;xs:extension base=&quot;GenericBusinessContentType&quot;&gt;
&gt;&gt;       &lt;xs:sequence&gt;
&gt;&gt;         &lt;xs:element name=&quot;Code&quot; type=&quot;xs:string&quot;&gt;&lt;/xs:element&gt;
&gt;&gt;         &lt;xs:element name=&quot;Description&quot; type=&quot;xs:string&quot;&gt;&lt;/xs:element&gt;
&gt;&gt;       &lt;/xs:sequence&gt;
&gt;&gt;     &lt;/xs:extension&gt;
&gt;&gt;   &lt;/xs:complexContent&gt;
&gt;&gt; &lt;/xs:complexType&gt;
&gt;
&gt; What does the element declaration for BusinessContent look like? Is it using
&gt; the GenericBusinessContentType or BusinessContentTypeImpl? You can only use
&gt; the BusinessContentTypeImpl content model if the type is declared as
&gt; BusinessContentTypeImpl either in the element declaration, or in an xsi:type
&gt; attribute in the instance.
&gt;
&gt; Have you considered using named model groups instead? As with any
&gt; object-oriented design, people sometimes overlook that composition is more
&gt; powerful than inheritance.
&gt;
&gt; Regards,
&gt;
&gt; Michael Kay
&gt; http://www.saxonica.com/
&gt; http://twitter.com/michaelhkay
&gt;
&gt;
&gt;&gt;
&gt;&gt; When I create an XML (adding tags Code and Description), I
&gt;&gt; get an error because tags Code and Description are not valid
&gt;&gt; children for BusinessContent, although I've extended it...
&gt;&gt;
&gt;&gt; I'd also like to force extension of BusinessContent. Then I
&gt;&gt; tried to use the abstract attribute, but then I couldn't add
&gt;&gt; the &lt;GenericInfo&gt; child...
&gt;&gt;
&gt;&gt; So, my questions are:
&gt;&gt; 1) how should I extend BusinessContent
&gt;&gt; (GenericBusinessContentType) so I could keep the current
&gt;&gt; elements (GenericInfo) add more elements..
&gt;&gt; 2) how could I force a &quot;child&quot; xsd file to import the
&gt;&gt; definitions.xsd and extend BusinessContent.
&gt;&gt;
&gt;&gt; Thanks !
&gt;&gt;
&gt;&gt;
&gt;
&gt;
</pre>
<span id="received"><dfn>Received on</dfn> Tuesday,  1 December 2009 18:10:23 GMT</span>
</div>
]]></content></entry><entry><title>RE: Extending Types </title><id>http://xsd.stylusstudio.com/2009Dec/post02000.htm</id><link rel="alternate" type="text/html" href="http://xsd.stylusstudio.com/2009Dec/post02000.htm" /><updated>2009-12-01T14:00:42Z</updated><content type="text/plain"><![CDATA[<pre id="body">
<a name="start2" accesskey="j" id="start2"></a>&gt; I have an <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">XML</a> that looks like this:
&gt; 
&gt; &lt;MyMessage&gt;
&gt;   &lt;HeaderInfo&gt;
&gt;      ....
&gt;   &lt;/HeaderInfo&gt;
&gt;   &lt;BusinessContent&gt;
&gt;     #someSpecificInformation# &lt;!-- This will be defined in a 
&gt; &quot;child&quot; <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema.html">XSD</a>
&gt;     &lt;GenericInfo&gt;
&gt;        &lt;information&gt;a&lt;/information&gt;
&gt;     &lt;/GenericInfo&gt;
&gt;   &lt;/BusinessContent&gt;
&gt; &lt;/MyMessage&gt;
&gt; 
&gt; In a file called definition.xsd, I defined the whole 
&gt; structure, including the BusinessContent ComplexType.. Then, 
&gt; I <a title="defined another XSD" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/videos/xmlschema1/xmlschema1.html">defined another XSD</a>, called item.xsd, where I'd like to 
&gt; define only the content of the BusinessContent, so I did 
&gt; something like this:
&gt; 
&gt; &lt;xs:include schemaLocation=&quot;definition.xsd&quot;&gt;&lt;/xs:include&gt;
&gt; &lt;<a title="xs:complexType" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema_editor.html">xs:complexType</a> name=&quot;BusinessContentTypeImpl&quot;&gt;
&gt;   &lt;xs:complexContent&gt;
&gt;     &lt;xs:extension base=&quot;GenericBusinessContentType&quot;&gt;
&gt;       &lt;xs:sequence&gt;
&gt;         &lt;xs:element name=&quot;Code&quot; type=&quot;xs:string&quot;&gt;&lt;/xs:element&gt;
&gt;         &lt;xs:element name=&quot;Description&quot; type=&quot;xs:string&quot;&gt;&lt;/xs:element&gt;
&gt;       &lt;/xs:sequence&gt;
&gt;     &lt;/xs:extension&gt;
&gt;   &lt;/xs:complexContent&gt;
&gt; &lt;/xs:complexType&gt;

What does the element declaration for BusinessContent look like? Is it using
the GenericBusinessContentType or BusinessContentTypeImpl? You can only use
the BusinessContentTypeImpl content model if the type is declared as
BusinessContentTypeImpl either in the element declaration, or in an xsi:type
attribute in the instance.

Have you considered using named model groups instead? As with any
object-oriented design, people sometimes overlook that composition is more
powerful than inheritance.

Regards,

<a title="Interview Michael Kay - W3C XML Member and Founder of Saxonica" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/michael_kay.html">Michael Kay</a>
http://www.saxonica.com/
http://twitter.com/michaelhkay 


&gt; 
&gt; When I create an XML (adding tags Code and Description), I 
&gt; get an error because tags Code and Description are not valid 
&gt; children for BusinessContent, although I've extended it...
&gt; 
&gt; I'd also like to force extension of BusinessContent. Then I 
&gt; tried to use the abstract attribute, but then I couldn't add 
&gt; the &lt;GenericInfo&gt; child...
&gt; 
&gt; So, my questions are:
&gt; 1) how should I extend BusinessContent 
&gt; (GenericBusinessContentType) so I could keep the current 
&gt; elements (GenericInfo) add more elements..
&gt; 2) how could I force a &quot;child&quot; xsd file to import the 
&gt; definitions.xsd and extend BusinessContent.
&gt; 
&gt; Thanks !
&gt; 
&gt; 
</pre>
<span id="received"><dfn>Received on</dfn> Tuesday,  1 December 2009 14:01:17 GMT</span>
</div>
]]></content></entry><entry><title>Extending Types </title><id>http://xsd.stylusstudio.com/2009Dec/post01000.htm</id><link rel="alternate" type="text/html" href="http://xsd.stylusstudio.com/2009Dec/post01000.htm" /><updated>2009-12-01T10:34:19Z</updated><content type="text/plain"><![CDATA[<pre id="body">
<a name="start1" accesskey="j" id="start1"></a>Hello People...

I'm not being able to work with extended types and after some hours
trying to find a solution, I decided to ask for help.. :)

here's the problem..

I have an <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">XML</a> that looks like this:

&lt;MyMessage&gt;
  &lt;HeaderInfo&gt;
     ....
  &lt;/HeaderInfo&gt;
  &lt;BusinessContent&gt;
    #someSpecificInformation# &lt;!-- This will be defined in a &quot;child&quot; <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema.html">XSD</a>
    &lt;GenericInfo&gt;
       &lt;information&gt;a&lt;/information&gt;
    &lt;/GenericInfo&gt;
  &lt;/BusinessContent&gt;
&lt;/MyMessage&gt;

In a file called definition.xsd, I defined the whole structure,
including the BusinessContent ComplexType.. Then, I <a title="XML Schema Tutorial" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/videos/xmlschema1/xmlschema1.html">defined another
XSD</a>, called item.xsd, where I'd like to define only the content of the
BusinessContent, so I did something like this:

&lt;xs:include schemaLocation=&quot;definition.xsd&quot;&gt;&lt;/xs:include&gt;
&lt;<a title="xs:complexType" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema_editor.html">xs:complexType</a> name=&quot;BusinessContentTypeImpl&quot;&gt;
  &lt;xs:complexContent&gt;
    &lt;xs:extension base=&quot;GenericBusinessContentType&quot;&gt;
      &lt;xs:sequence&gt;
        &lt;xs:element name=&quot;Code&quot; type=&quot;xs:string&quot;&gt;&lt;/xs:element&gt;
        &lt;xs:element name=&quot;Description&quot; type=&quot;xs:string&quot;&gt;&lt;/xs:element&gt;
      &lt;/xs:sequence&gt;
    &lt;/xs:extension&gt;
  &lt;/xs:complexContent&gt;
&lt;/xs:complexType&gt;

When I create an XML (adding tags Code and Description), I get an
error because tags Code and Description are not valid children for
BusinessContent, although I've extended it...

I'd also like to force extension of BusinessContent. Then I tried to
use the abstract attribute, but then I couldn't add the &lt;GenericInfo&gt;
child...

So, my questions are:
1) how should I extend BusinessContent (GenericBusinessContentType) so
I could keep the current elements (GenericInfo) add more elements..
2) how could I force a &quot;child&quot; xsd file to import the definitions.xsd
and extend BusinessContent.

Thanks !
</pre>
<span id="received"><dfn>Received on</dfn> Tuesday,  1 December 2009 13:46:21 GMT</span>
</div>
]]></content></entry><entry><title>RE: Reg. &amp;lt;all&amp;gt; model group extension </title><id>http://xsd.stylusstudio.com/2009Dec/post00000.htm</id><link rel="alternate" type="text/html" href="http://xsd.stylusstudio.com/2009Dec/post00000.htm" /><updated>2009-12-01T09:57:42Z</updated><content type="text/plain"><![CDATA[<pre id="body">
<a name="start0" accesskey="j" id="start0"></a>Hi Michel Kay,

	Thank you very much for your reply.

Thanks and Regards,
Bharath.


-----Original Message-----
From: <a href="mailto:xmlschema-dev-request&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;?Subject=RE%3A%20Reg.%20%3Call%3E%20model%20group%20extension&amp;In-Reply-To=%253C000001ca723e%24a050d030%242301120a%40china.huawei.com%253E&amp;References=%253C000001ca723e%24a050d030%242301120a%40china.huawei.com%253E">xmlschema-dev-request&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;</a> [mailto:<a href="mailto:xmlschema-dev-request&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;?Subject=RE%3A%20Reg.%20%3Call%3E%20model%20group%20extension&amp;In-Reply-To=%253C000001ca723e%24a050d030%242301120a%40china.huawei.com%253E&amp;References=%253C000001ca723e%24a050d030%242301120a%40china.huawei.com%253E">xmlschema-dev-request&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;</a>] On
Behalf Of <a title="Interview Michael Kay - W3C XML Member and Founder of Saxonica" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/michael_kay.html">Michael Kay</a>
Sent: Monday, November 30, 2009 10:06 PM
To: 'bharath'; 'Pete Cordell'; <a href="mailto:xmlschema-dev&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;?Subject=RE%3A%20Reg.%20%3Call%3E%20model%20group%20extension&amp;In-Reply-To=%253C000001ca723e%24a050d030%242301120a%40china.huawei.com%253E&amp;References=%253C000001ca723e%24a050d030%242301120a%40china.huawei.com%253E">xmlschema-dev&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;</a>
Cc: <a href="mailto:rajithr&#x40;&#0104;&#0117;&#0097;&#0119;&#0101;&#0105;&#0046;&#0099;&#0111;&#0109;?Subject=RE%3A%20Reg.%20%3Call%3E%20model%20group%20extension&amp;In-Reply-To=%253C000001ca723e%24a050d030%242301120a%40china.huawei.com%253E&amp;References=%253C000001ca723e%24a050d030%242301120a%40china.huawei.com%253E">rajithr&#x40;&#0104;&#0117;&#0097;&#0119;&#0101;&#0105;&#0046;&#0099;&#0111;&#0109;</a>; <a href="mailto:arathikarki&#x40;&#0104;&#0117;&#0097;&#0119;&#0101;&#0105;&#0046;&#0099;&#0111;&#0109;?Subject=RE%3A%20Reg.%20%3Call%3E%20model%20group%20extension&amp;In-Reply-To=%253C000001ca723e%24a050d030%242301120a%40china.huawei.com%253E&amp;References=%253C000001ca723e%24a050d030%242301120a%40china.huawei.com%253E">arathikarki&#x40;&#0104;&#0117;&#0097;&#0119;&#0101;&#0105;&#0046;&#0099;&#0111;&#0109;</a>; <a href="mailto:ksrilakshmi&#x40;&#0104;&#0117;&#0097;&#0119;&#0101;&#0105;&#0046;&#0099;&#0111;&#0109;?Subject=RE%3A%20Reg.%20%3Call%3E%20model%20group%20extension&amp;In-Reply-To=%253C000001ca723e%24a050d030%242301120a%40china.huawei.com%253E&amp;References=%253C000001ca723e%24a050d030%242301120a%40china.huawei.com%253E">ksrilakshmi&#x40;&#0104;&#0117;&#0097;&#0119;&#0101;&#0105;&#0046;&#0099;&#0111;&#0109;</a>
Subject: RE: Reg. &lt;all&gt; model group extension

Well, the <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/w3c/schema0/_index.htm">schema spec</a> is not easy to read: it needs a lot of study to
understand the language it uses. And indeed, it seems my explanation in my
previous email was wrong! Let's take this rule:

[Definition:]  For a particle (call it E, for extension) to be a valid
extension of another particle (call it B, for base)  one of the following
must be true:
1 They are the same particle.
2 E's {min occurs}={max occurs}=1 and its {term} is a sequence group whose
{particles}' first member is a particle all of whose properties,
recursively, are identical to those of B, with the exception of {annotation}
properties.

First you need to understand what a particle is. Loosely, it's anything that
appears in a content model but in practice we're only concerned here with
group-level particles (not leaf particles, which are either element
particles or wildcards). A group-level particle is technically referred to
as a &quot;model group&quot;, and it has a term which is either a choice group, a
sequence group, or an all group. 

The theory here is that we <a title="XML Schema Tutorial" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/videos/xmlschema1/xmlschema1.html">build the schema</a> components (such as particles)
from the source XSD, and then test whether the components we have built are
valid. (In practice, the processor will usually do these tests while
building the components, and may not even have the capability to build
invalid components). So we first have to see what the rules are for
constructing a complex type component by extension. These are given under
Complex Type Definition with complex content Schema Component in section
3.4.2. Look for the rules for the {content type} property. For both your
complex types, rule 2.2 applies, which means that the effective content is
the particle corresponding to the &lt;all&gt; element; and then rule 3.2.3
applies, which means that the {content type} of the derived type is
effectively the model group:

&lt;sequence&gt;
        &lt;all&gt;
            &lt;element name=&quot;a1&quot; type=&quot;string&quot;/&gt;
            &lt;element name=&quot;a2&quot; type=&quot;string&quot;/&gt;
        &lt;/all&gt;
        &lt;all&gt;
             &lt;element name=&quot;a3&quot; type=&quot;string&quot;/&gt;
        &lt;/all&gt;
&lt;/sequence&gt;

Now there's a rule in 3.8.6, &quot;Schema Component Constraint: All Group
Limited&quot;, which determines whether this model group is actually valid, and
it turns out that it isn't.

The rule says:

When a model group has {compositor} all, then all of the following must be
true:
1 It appears only as the value of one or both of the following properties:
1.1 the {model group} property of a model group definition.
1.2 the {term} property of a particle with {max occurs}=1 which is part of a
pair which constitutes the {content type} of a complex type definition.
2 The {max occurs} of all the particles in the {particles} of the group must
be 0 or 1.

Now here we have two model groups with compositor &quot;all&quot; that appear as part
of a model group with compositor &quot;sequence&quot;, which doesn't satisfy either
1.1 or 1.2 (the sequence is not a &quot;model group definition&quot;, you only get a
&quot;model group definition&quot; from a &lt;group&gt; element in the schema document.). So
this extended model group isn't valid and therefore the schema isn't valid.

I mentioned the rule Schema Component Constraint: Particle Valid (Extension)
but actually we don't get this far. If we did get this far, the rule would
test whether

&lt;sequence&gt;
        &lt;all&gt;
            &lt;element name=&quot;a1&quot; type=&quot;string&quot;/&gt;
            &lt;element name=&quot;a2&quot; type=&quot;string&quot;/&gt;
        &lt;/all&gt;
        &lt;all&gt;
             &lt;element name=&quot;a3&quot; type=&quot;string&quot;/&gt;
        &lt;/all&gt;
&lt;/sequence&gt;

was a valid extension of 

&lt;all&gt;
      &lt;element name=&quot;a1&quot; type=&quot;string&quot;/&gt;
      &lt;element name=&quot;a2&quot; type=&quot;string&quot;/&gt; &lt;/all&gt;

and as it happens, if it got past the rule at 3.8.6, then it would be.

Regards,

Michael Kay
http://www.saxonica.com/
http://twitter.com/michaelhkay 
</pre>
<span id="received"><dfn>Received on</dfn> Tuesday,  1 December 2009 04:28:29 GMT</span>
</div>
]]></content></entry><entry><title>RE: Reg. &amp;lt;all&amp;gt; model group extension </title><id>http://xsd.stylusstudio.com/2009Nov/post08001.htm</id><link rel="alternate" type="text/html" href="http://xsd.stylusstudio.com/2009Nov/post08001.htm" /><updated>2009-11-30T21:26:39Z</updated><content type="text/plain"><![CDATA[<pre id="body">
<a name="start18" accesskey="j" id="start18"></a> 
Hi Michek Kay,

Can you please give me any example for the clause 2 of 3.9.6 as i have not
understood that point clearly.


Thanks and Regards,
Bharath.



-----Original Message-----
From: <a href="mailto:xmlschema-dev-request&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;?Subject=RE%3A%20Reg.%20%3Call%3E%20model%20group%20extension&amp;In-Reply-To=%253C002001ca71d5%24b4b9d210%242301120a%40china.huawei.com%253E&amp;References=%253C002001ca71d5%24b4b9d210%242301120a%40china.huawei.com%253E">xmlschema-dev-request&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;</a> [mailto:<a href="mailto:xmlschema-dev-request&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;?Subject=RE%3A%20Reg.%20%3Call%3E%20model%20group%20extension&amp;In-Reply-To=%253C002001ca71d5%24b4b9d210%242301120a%40china.huawei.com%253E&amp;References=%253C002001ca71d5%24b4b9d210%242301120a%40china.huawei.com%253E">xmlschema-dev-request&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;</a>] On
Behalf Of <a title="Interview Michael Kay - W3C XML Member and Founder of Saxonica" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/michael_kay.html">Michael Kay</a>
Sent: Monday, November 30, 2009 9:12 PM
To: 'bharath'; 'Pete Cordell'; <a href="mailto:xmlschema-dev&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;?Subject=RE%3A%20Reg.%20%3Call%3E%20model%20group%20extension&amp;In-Reply-To=%253C002001ca71d5%24b4b9d210%242301120a%40china.huawei.com%253E&amp;References=%253C002001ca71d5%24b4b9d210%242301120a%40china.huawei.com%253E">xmlschema-dev&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;</a>
Cc: <a href="mailto:rajithr&#x40;&#0104;&#0117;&#0097;&#0119;&#0101;&#0105;&#0046;&#0099;&#0111;&#0109;?Subject=RE%3A%20Reg.%20%3Call%3E%20model%20group%20extension&amp;In-Reply-To=%253C002001ca71d5%24b4b9d210%242301120a%40china.huawei.com%253E&amp;References=%253C002001ca71d5%24b4b9d210%242301120a%40china.huawei.com%253E">rajithr&#x40;&#0104;&#0117;&#0097;&#0119;&#0101;&#0105;&#0046;&#0099;&#0111;&#0109;</a>; <a href="mailto:arathikarki&#x40;&#0104;&#0117;&#0097;&#0119;&#0101;&#0105;&#0046;&#0099;&#0111;&#0109;?Subject=RE%3A%20Reg.%20%3Call%3E%20model%20group%20extension&amp;In-Reply-To=%253C002001ca71d5%24b4b9d210%242301120a%40china.huawei.com%253E&amp;References=%253C002001ca71d5%24b4b9d210%242301120a%40china.huawei.com%253E">arathikarki&#x40;&#0104;&#0117;&#0097;&#0119;&#0101;&#0105;&#0046;&#0099;&#0111;&#0109;</a>; <a href="mailto:ksrilakshmi&#x40;&#0104;&#0117;&#0097;&#0119;&#0101;&#0105;&#0046;&#0099;&#0111;&#0109;?Subject=RE%3A%20Reg.%20%3Call%3E%20model%20group%20extension&amp;In-Reply-To=%253C002001ca71d5%24b4b9d210%242301120a%40china.huawei.com%253E&amp;References=%253C002001ca71d5%24b4b9d210%242301120a%40china.huawei.com%253E">ksrilakshmi&#x40;&#0104;&#0117;&#0097;&#0119;&#0101;&#0105;&#0046;&#0099;&#0111;&#0109;</a>
Subject: RE: Reg. &lt;all&gt; <a title="Building XML Schemas" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/videos/xmlschema1/xmlschema1.html">model group extension

Look for Schema</a> Component Constraint: Particle Valid (Extension) in 3.9.6.
Clause 2 says that the {term} must be a sequence group (it cannot be choice
or all).

Regards,

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

&gt; -----Original Message-----
&gt; From: <a href="mailto:xmlschema-dev-request&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;?Subject=RE%3A%20Reg.%20%3Call%3E%20model%20group%20extension&amp;In-Reply-To=%253C002001ca71d5%24b4b9d210%242301120a%40china.huawei.com%253E&amp;References=%253C002001ca71d5%24b4b9d210%242301120a%40china.huawei.com%253E">xmlschema-dev-request&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;</a>
&gt; [mailto:<a href="mailto:xmlschema-dev-request&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;?Subject=RE%3A%20Reg.%20%3Call%3E%20model%20group%20extension&amp;In-Reply-To=%253C002001ca71d5%24b4b9d210%242301120a%40china.huawei.com%253E&amp;References=%253C002001ca71d5%24b4b9d210%242301120a%40china.huawei.com%253E">xmlschema-dev-request&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;</a>] On Behalf Of bharath
&gt; Sent: 30 November 2009 15:23
&gt; To: 'Michael Kay'; 'Pete Cordell'; <a href="mailto:xmlschema-dev&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;?Subject=RE%3A%20Reg.%20%3Call%3E%20model%20group%20extension&amp;In-Reply-To=%253C002001ca71d5%24b4b9d210%242301120a%40china.huawei.com%253E&amp;References=%253C002001ca71d5%24b4b9d210%242301120a%40china.huawei.com%253E">xmlschema-dev&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;</a>
&gt; Cc: <a href="mailto:rajithr&#x40;&#0104;&#0117;&#0097;&#0119;&#0101;&#0105;&#0046;&#0099;&#0111;&#0109;?Subject=RE%3A%20Reg.%20%3Call%3E%20model%20group%20extension&amp;In-Reply-To=%253C002001ca71d5%24b4b9d210%242301120a%40china.huawei.com%253E&amp;References=%253C002001ca71d5%24b4b9d210%242301120a%40china.huawei.com%253E">rajithr&#x40;&#0104;&#0117;&#0097;&#0119;&#0101;&#0105;&#0046;&#0099;&#0111;&#0109;</a>; <a href="mailto:arathikarki&#x40;&#0104;&#0117;&#0097;&#0119;&#0101;&#0105;&#0046;&#0099;&#0111;&#0109;?Subject=RE%3A%20Reg.%20%3Call%3E%20model%20group%20extension&amp;In-Reply-To=%253C002001ca71d5%24b4b9d210%242301120a%40china.huawei.com%253E&amp;References=%253C002001ca71d5%24b4b9d210%242301120a%40china.huawei.com%253E">arathikarki&#x40;&#0104;&#0117;&#0097;&#0119;&#0101;&#0105;&#0046;&#0099;&#0111;&#0109;</a>; <a href="mailto:ksrilakshmi&#x40;&#0104;&#0117;&#0097;&#0119;&#0101;&#0105;&#0046;&#0099;&#0111;&#0109;?Subject=RE%3A%20Reg.%20%3Call%3E%20model%20group%20extension&amp;In-Reply-To=%253C002001ca71d5%24b4b9d210%242301120a%40china.huawei.com%253E&amp;References=%253C002001ca71d5%24b4b9d210%242301120a%40china.huawei.com%253E">ksrilakshmi&#x40;&#0104;&#0117;&#0097;&#0119;&#0101;&#0105;&#0046;&#0099;&#0111;&#0109;</a>
&gt; Subject: RE: Reg. &lt;all&gt; model group extension
&gt; 
&gt; Hi Pete Cordell/ Michek Kay
&gt; 
&gt; Thanks for your reply. 
&gt; Can you please tell me where I can find this limitation of &lt;all&gt; 
&gt; extension in xml schema specification.
&gt; 
&gt; 
&gt; Thanks and Regards,
&gt; Bharath.
&gt; 
&gt; 
&gt; -----Original Message-----
&gt; From: <a href="mailto:xmlschema-dev-request&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;?Subject=RE%3A%20Reg.%20%3Call%3E%20model%20group%20extension&amp;In-Reply-To=%253C002001ca71d5%24b4b9d210%242301120a%40china.huawei.com%253E&amp;References=%253C002001ca71d5%24b4b9d210%242301120a%40china.huawei.com%253E">xmlschema-dev-request&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;</a>
&gt; [mailto:<a href="mailto:xmlschema-dev-request&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;?Subject=RE%3A%20Reg.%20%3Call%3E%20model%20group%20extension&amp;In-Reply-To=%253C002001ca71d5%24b4b9d210%242301120a%40china.huawei.com%253E&amp;References=%253C002001ca71d5%24b4b9d210%242301120a%40china.huawei.com%253E">xmlschema-dev-request&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;</a>] On Behalf Of Michael Kay
&gt; Sent: Monday, November 30, 2009 8:41 PM
&gt; To: 'Pete Cordell'; 'bharath'; <a href="mailto:xmlschema-dev&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;?Subject=RE%3A%20Reg.%20%3Call%3E%20model%20group%20extension&amp;In-Reply-To=%253C002001ca71d5%24b4b9d210%242301120a%40china.huawei.com%253E&amp;References=%253C002001ca71d5%24b4b9d210%242301120a%40china.huawei.com%253E">xmlschema-dev&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;</a>
&gt; Cc: <a href="mailto:rajithr&#x40;&#0104;&#0117;&#0097;&#0119;&#0101;&#0105;&#0046;&#0099;&#0111;&#0109;?Subject=RE%3A%20Reg.%20%3Call%3E%20model%20group%20extension&amp;In-Reply-To=%253C002001ca71d5%24b4b9d210%242301120a%40china.huawei.com%253E&amp;References=%253C002001ca71d5%24b4b9d210%242301120a%40china.huawei.com%253E">rajithr&#x40;&#0104;&#0117;&#0097;&#0119;&#0101;&#0105;&#0046;&#0099;&#0111;&#0109;</a>; <a href="mailto:arathikarki&#x40;&#0104;&#0117;&#0097;&#0119;&#0101;&#0105;&#0046;&#0099;&#0111;&#0109;?Subject=RE%3A%20Reg.%20%3Call%3E%20model%20group%20extension&amp;In-Reply-To=%253C002001ca71d5%24b4b9d210%242301120a%40china.huawei.com%253E&amp;References=%253C002001ca71d5%24b4b9d210%242301120a%40china.huawei.com%253E">arathikarki&#x40;&#0104;&#0117;&#0097;&#0119;&#0101;&#0105;&#0046;&#0099;&#0111;&#0109;</a>
&gt; Subject: RE: Reg. &lt;all&gt; model group extension
&gt; 
&gt;  
&gt; &gt; 
&gt; &gt; I don't believe you are allowed to extend xs:all in XSD 1.0.  
&gt; &gt; This has been relaxed in the upcoming 1.1.
&gt; 
&gt; Correct (thanks for spotting this, Pete).
&gt; 
&gt; After fixing a couple of typos (bad XML end tags), I get the following 
&gt; from Saxon 9.2 running with -xsdversion:1.0:
&gt; 
&gt; Error on line 15 of test.xsd:
&gt;   The type DerivedType is defined with xs:all so (in XSD 1.0) it 
&gt; cannot be derived by
&gt;   extension from a non-empty type
&gt; Schema processing failed: The schema is invalid
&gt; 
&gt; but with -xsdversion:1.1 I get:
&gt; 
&gt; Schema checking successful.
&gt; 
&gt; Regards,
&gt; 
&gt; Michael Kay
&gt; http://www.saxonica.com/
&gt; http://twitter.com/michaelhkay
&gt; 
&gt; 
&gt; 
</pre>
<span id="received"><dfn>Received on</dfn> Monday, 30 November 2009 15:57:28 GMT</span>
</div>
]]></content></entry><entry><title>RE: Reg. &amp;lt;all&amp;gt; model group extension </title><id>http://xsd.stylusstudio.com/2009Nov/post06001.htm</id><link rel="alternate" type="text/html" href="http://xsd.stylusstudio.com/2009Nov/post06001.htm" /><updated>2009-11-30T20:52:49Z</updated><content type="text/plain"><![CDATA[<pre id="body">
<a name="start16" accesskey="j" id="start16"></a>Hi Pete Cordell/ Michek Kay

Thanks for your reply. 
Can you please tell me where I can find this limitation of &lt;all&gt; extension
in <a title="xml schema specification" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/w3c/schema0/_index.htm">xml schema specification</a>.


Thanks and Regards,
Bharath.


-----Original Message-----
From: <a href="mailto:xmlschema-dev-request&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;?Subject=RE%3A%20Reg.%20%3Call%3E%20model%20group%20extension&amp;In-Reply-To=%253C001901ca71d0%24fa953860%242301120a%40china.huawei.com%253E&amp;References=%253C001901ca71d0%24fa953860%242301120a%40china.huawei.com%253E">xmlschema-dev-request&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;</a> [mailto:<a href="mailto:xmlschema-dev-request&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;?Subject=RE%3A%20Reg.%20%3Call%3E%20model%20group%20extension&amp;In-Reply-To=%253C001901ca71d0%24fa953860%242301120a%40china.huawei.com%253E&amp;References=%253C001901ca71d0%24fa953860%242301120a%40china.huawei.com%253E">xmlschema-dev-request&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;</a>] On
Behalf Of <a title="Interview Michael Kay - W3C XML Member and Founder of Saxonica" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/michael_kay.html">Michael Kay</a>
Sent: Monday, November 30, 2009 8:41 PM
To: 'Pete Cordell'; 'bharath'; <a href="mailto:xmlschema-dev&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;?Subject=RE%3A%20Reg.%20%3Call%3E%20model%20group%20extension&amp;In-Reply-To=%253C001901ca71d0%24fa953860%242301120a%40china.huawei.com%253E&amp;References=%253C001901ca71d0%24fa953860%242301120a%40china.huawei.com%253E">xmlschema-dev&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;</a>
Cc: <a href="mailto:rajithr&#x40;&#0104;&#0117;&#0097;&#0119;&#0101;&#0105;&#0046;&#0099;&#0111;&#0109;?Subject=RE%3A%20Reg.%20%3Call%3E%20model%20group%20extension&amp;In-Reply-To=%253C001901ca71d0%24fa953860%242301120a%40china.huawei.com%253E&amp;References=%253C001901ca71d0%24fa953860%242301120a%40china.huawei.com%253E">rajithr&#x40;&#0104;&#0117;&#0097;&#0119;&#0101;&#0105;&#0046;&#0099;&#0111;&#0109;</a>; <a href="mailto:arathikarki&#x40;&#0104;&#0117;&#0097;&#0119;&#0101;&#0105;&#0046;&#0099;&#0111;&#0109;?Subject=RE%3A%20Reg.%20%3Call%3E%20model%20group%20extension&amp;In-Reply-To=%253C001901ca71d0%24fa953860%242301120a%40china.huawei.com%253E&amp;References=%253C001901ca71d0%24fa953860%242301120a%40china.huawei.com%253E">arathikarki&#x40;&#0104;&#0117;&#0097;&#0119;&#0101;&#0105;&#0046;&#0099;&#0111;&#0109;</a>
Subject: RE: Reg. &lt;all&gt; model group extension

 
&gt; 
&gt; I don't believe you are allowed to extend <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema_editor.html">xs:all</a> in XSD 1.0.  
&gt; This has been relaxed in the upcoming 1.1.

Correct (thanks for spotting this, Pete).

After fixing a couple of typos (bad XML end tags), I get the following from
<a title="Saxon" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/saxon_xquery_processor.html">Saxon</a> 9.2 running with -xsdversion:1.0:

Error on line 15 of test.xsd:
  The type DerivedType is defined with xs:all so (in XSD 1.0) it cannot be
derived by
  extension from a non-empty type
Schema processing failed: The schema is invalid

but with -xsdversion:1.1 I get:

Schema checking successful.

Regards,

Michael Kay
http://www.saxonica.com/
http://twitter.com/michaelhkay 
</pre>
<span id="received"><dfn>Received on</dfn> Monday, 30 November 2009 15:23:58 GMT</span>
</div>
]]></content></entry><entry><title>RE: Reg. &amp;lt;all&amp;gt; model group extension </title><id>http://xsd.stylusstudio.com/2009Nov/post03001.htm</id><link rel="alternate" type="text/html" href="http://xsd.stylusstudio.com/2009Nov/post03001.htm" /><updated>2009-11-30T19:56:03Z</updated><content type="text/plain"><![CDATA[<pre id="body">
<a name="start13" accesskey="j" id="start13"></a>Hi..
I am getting error in libxml2 as well as altova spy saying that 
 
&quot;An all modelgroup is neither allowed in complexType definition
&quot;tns:BaseType&quot; nor in its extension tns: DerivedType&quot;. &quot;
 
Can you please lookinto this <a title="schema" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema.html">schema</a> whether it is valid or not.
 
 
Thanks and Regards,
Bharath.
 

htipl
HUAWEI TECHNOLOGIES CO.,LTD.  huawei_logo
&lt;file:///C:/Documents%20and%20Settings/b72392/Application%20Data/Microsoft/S
ignatures/outlook_huawei_logo_en.jpg&gt; 


Address: Huawei Industrial Base
Bantian Longgang
Shenzhen 518129, P.R.China
www.huawei.com
----------------------------------------------------------------------------
---------------------------------------------------------
This e-mail and its attachments contain confidential information from
HUAWEI, which 
is intended only for the person or entity whose address is listed above. Any
use of the 
information contained herein in any way (including, but not limited to,
total or partial 
disclosure, reproduction, or dissemination) by persons other than the
intended 
recipient(s) is prohibited. If you receive this e-mail in error, please
notify the sender by 
phone or email immediately and delete it!

 

  _____  

From: <a title="Interview Michael Kay - W3C XML Member and Founder of Saxonica" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/michael_kay.html">Michael Kay</a> [mailto:<a href="mailto:mike&#x40;&#0115;&#0097;&#0120;&#0111;&#0110;&#0105;&#0099;&#0097;&#0046;&#0099;&#0111;&#0109;?Subject=RE%3A%20Reg.%20%3Call%3E%20model%20group%20extension&amp;In-Reply-To=%253C000e01ca71c9%240c39cc00%242301120a%40china.huawei.com%253E&amp;References=%253C000e01ca71c9%240c39cc00%242301120a%40china.huawei.com%253E">mike&#x40;&#0115;&#0097;&#0120;&#0111;&#0110;&#0105;&#0099;&#0097;&#0046;&#0099;&#0111;&#0109;</a>] 
Sent: Monday, November 30, 2009 7:36 PM
To: 'bharath'; <a href="mailto:xmlschema-dev&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;?Subject=RE%3A%20Reg.%20%3Call%3E%20model%20group%20extension&amp;In-Reply-To=%253C000e01ca71c9%240c39cc00%242301120a%40china.huawei.com%253E&amp;References=%253C000e01ca71c9%240c39cc00%242301120a%40china.huawei.com%253E">xmlschema-dev&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;</a>
Cc: <a href="mailto:rajithr&#x40;&#0104;&#0117;&#0097;&#0119;&#0101;&#0105;&#0046;&#0099;&#0111;&#0109;?Subject=RE%3A%20Reg.%20%3Call%3E%20model%20group%20extension&amp;In-Reply-To=%253C000e01ca71c9%240c39cc00%242301120a%40china.huawei.com%253E&amp;References=%253C000e01ca71c9%240c39cc00%242301120a%40china.huawei.com%253E">rajithr&#x40;&#0104;&#0117;&#0097;&#0119;&#0101;&#0105;&#0046;&#0099;&#0111;&#0109;</a>; <a href="mailto:arathikarki&#x40;&#0104;&#0117;&#0097;&#0119;&#0101;&#0105;&#0046;&#0099;&#0111;&#0109;?Subject=RE%3A%20Reg.%20%3Call%3E%20model%20group%20extension&amp;In-Reply-To=%253C000e01ca71c9%240c39cc00%242301120a%40china.huawei.com%253E&amp;References=%253C000e01ca71c9%240c39cc00%242301120a%40china.huawei.com%253E">arathikarki&#x40;&#0104;&#0117;&#0097;&#0119;&#0101;&#0105;&#0046;&#0099;&#0111;&#0109;</a>
Subject: RE: Reg. &lt;all&gt; model group extension


It looks OK to me by visual inspection - I haven't tried running it.
 
Why do you doubt that it's OK? 

Regards,

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

 
 


  _____  

From: <a href="mailto:xmlschema-dev-request&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;?Subject=RE%3A%20Reg.%20%3Call%3E%20model%20group%20extension&amp;In-Reply-To=%253C000e01ca71c9%240c39cc00%242301120a%40china.huawei.com%253E&amp;References=%253C000e01ca71c9%240c39cc00%242301120a%40china.huawei.com%253E">xmlschema-dev-request&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;</a> [mailto:<a href="mailto:xmlschema-dev-request&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;?Subject=RE%3A%20Reg.%20%3Call%3E%20model%20group%20extension&amp;In-Reply-To=%253C000e01ca71c9%240c39cc00%242301120a%40china.huawei.com%253E&amp;References=%253C000e01ca71c9%240c39cc00%242301120a%40china.huawei.com%253E">xmlschema-dev-request&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;</a>] On
Behalf Of bharath
Sent: 30 November 2009 13:55
To: <a href="mailto:xmlschema-dev&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;?Subject=RE%3A%20Reg.%20%3Call%3E%20model%20group%20extension&amp;In-Reply-To=%253C000e01ca71c9%240c39cc00%242301120a%40china.huawei.com%253E&amp;References=%253C000e01ca71c9%240c39cc00%242301120a%40china.huawei.com%253E">xmlschema-dev&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;</a>
Cc: <a href="mailto:rajithr&#x40;&#0104;&#0117;&#0097;&#0119;&#0101;&#0105;&#0046;&#0099;&#0111;&#0109;?Subject=RE%3A%20Reg.%20%3Call%3E%20model%20group%20extension&amp;In-Reply-To=%253C000e01ca71c9%240c39cc00%242301120a%40china.huawei.com%253E&amp;References=%253C000e01ca71c9%240c39cc00%242301120a%40china.huawei.com%253E">rajithr&#x40;&#0104;&#0117;&#0097;&#0119;&#0101;&#0105;&#0046;&#0099;&#0111;&#0109;</a>; <a href="mailto:arathikarki&#x40;&#0104;&#0117;&#0097;&#0119;&#0101;&#0105;&#0046;&#0099;&#0111;&#0109;?Subject=RE%3A%20Reg.%20%3Call%3E%20model%20group%20extension&amp;In-Reply-To=%253C000e01ca71c9%240c39cc00%242301120a%40china.huawei.com%253E&amp;References=%253C000e01ca71c9%240c39cc00%242301120a%40china.huawei.com%253E">arathikarki&#x40;&#0104;&#0117;&#0097;&#0119;&#0101;&#0105;&#0046;&#0099;&#0111;&#0109;</a>
Subject: Reg. &lt;all&gt; model group extension


Hi All,
 
I have one doubt reg. &lt;all&gt; model group extension.
 
i have the following schema. 
 
&lt;schema targetNamespace=&quot;testschema&quot; xmlns:tns=&quot;testschema&quot;&gt;
    &lt;complexType name=&quot;BaseType&quot;&gt;
        &lt;all&gt;
            &lt;element name=&quot;a1&quot; type=&quot;string&quot;/&gt;

            &lt;element name=&quot;a2&quot; type=&quot;string&quot;/&gt;
        &lt;/all&gt;
    &lt;/complexType&gt;
 
    &lt;complexType name=&quot;DerivedType&quot;&gt;
        &lt;complexContent&gt;
          &lt;extension base=&quot;tns:BaseType&quot;&gt;
            &lt;all&gt;
                &lt;element name=&quot;a3&quot; type=&quot;string&quot;/&gt;
            &lt;/all&gt;
        &lt;extension&gt;
        &lt;/complexContent&gt;
    &lt;complexType&gt;
 
&lt;/schema&gt;
 
Is this extension of the &lt;all&gt; model group correct?? 
If not please provide me the reason. Please reply me as soon as possible.
 
 
Thanks and Regards,
Bharath.
</pre>
<span id="received"><dfn>Received on</dfn> Monday, 30 November 2009 14:26:49 GMT</span>
</div>
]]></content></entry><entry><title>Reg. &amp;lt;all&amp;gt; model group extension </title><id>http://xsd.stylusstudio.com/2009Nov/post01001.htm</id><link rel="alternate" type="text/html" href="http://xsd.stylusstudio.com/2009Nov/post01001.htm" /><updated>2009-11-30T19:25:20Z</updated><content type="text/plain"><![CDATA[<pre id="body">
<a name="start11" accesskey="j" id="start11"></a>Hi All,
 
I have one doubt reg. &lt;all&gt; model group extension.
 
i have the following <a title="schema" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema.html">schema</a>. 
 
&lt;schema targetNamespace=&quot;testschema&quot; xmlns:tns=&quot;testschema&quot;&gt;
    &lt;complexType name=&quot;BaseType&quot;&gt;
        &lt;all&gt;
            &lt;element name=&quot;a1&quot; type=&quot;string&quot;/&gt;
            &lt;element name=&quot;a2&quot; type=&quot;string&quot;/&gt;
        &lt;/all&gt;
    &lt;/complexType&gt;
 
    &lt;complexType name=&quot;DerivedType&quot;&gt;
        &lt;complexContent&gt;
          &lt;extension base=&quot;tns:BaseType&quot;&gt;
            &lt;all&gt;
                &lt;element name=&quot;a3&quot; type=&quot;string&quot;/&gt;
            &lt;/all&gt;
        &lt;extension&gt;
        &lt;/complexContent&gt;
    &lt;complexType&gt;
 
&lt;/schema&gt;
 
Is this extension of the &lt;all&gt; model group correct?? 
If not please provide me the reason. Please reply me as soon as possible.
 
 
Thanks and Regards,
Bharath.
</pre>
<span id="received"><dfn>Received on</dfn> Monday, 30 November 2009 13:56:10 GMT</span>
</div>
]]></content></entry><entry><title>RE: Reg. &amp;lt;all&amp;gt; model group extension </title><id>http://xsd.stylusstudio.com/2009Nov/post09001.htm</id><link rel="alternate" type="text/html" href="http://xsd.stylusstudio.com/2009Nov/post09001.htm" /><updated>2009-11-30T16:35:38Z</updated><content type="text/plain"><![CDATA[<pre id="body">
<a name="start19" accesskey="j" id="start19"></a>Well, the <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/w3c/schema0/_index.htm">schema spec</a> is not easy to read: it needs a lot of study to
understand the language it uses. And indeed, it seems my explanation in my
previous email was wrong! Let's take this rule:

[Definition:]  For a particle (call it E, for extension) to be a valid
extension of another particle (call it B, for base)  one of the following
must be true:
1 They are the same particle.
2 E's {min occurs}={max occurs}=1 and its {term} is a sequence group whose
{particles}' first member is a particle all of whose properties,
recursively, are identical to those of B, with the exception of {annotation}
properties.

First you need to understand what a particle is. Loosely, it's anything that
appears in a content model but in practice we're only concerned here with
group-level particles (not leaf particles, which are either element
particles or wildcards). A group-level particle is technically referred to
as a &quot;model group&quot;, and it has a term which is either a choice group, a
sequence group, or an all group. 

The theory here is that we <a title="XML Schema Tutorial" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/videos/xmlschema1/xmlschema1.html">build the schema</a> components (such as particles)
from the source XSD, and then test whether the components we have built are
valid. (In practice, the processor will usually do these tests while
building the components, and may not even have the capability to build
invalid components). So we first have to see what the rules are for
constructing a complex type component by extension. These are given under
Complex Type Definition with complex content Schema Component in section
3.4.2. Look for the rules for the {content type} property. For both your
complex types, rule 2.2 applies, which means that the effective content is
the particle corresponding to the &lt;all&gt; element; and then rule 3.2.3
applies, which means that the {content type} of the derived type is
effectively the model group:

&lt;sequence&gt;
        &lt;all&gt;
            &lt;element name=&quot;a1&quot; type=&quot;string&quot;/&gt;
            &lt;element name=&quot;a2&quot; type=&quot;string&quot;/&gt;
        &lt;/all&gt;
        &lt;all&gt;
             &lt;element name=&quot;a3&quot; type=&quot;string&quot;/&gt;
        &lt;/all&gt;
&lt;/sequence&gt;

Now there's a rule in 3.8.6, &quot;Schema Component Constraint: All Group
Limited&quot;, which determines whether this model group is actually valid, and
it turns out that it isn't.

The rule says:

When a model group has {<a title="compositor" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema_editor.html">compositor</a>} all, then all of the following must be
true:
1 It appears only as the value of one or both of the following properties:
1.1 the {model group} property of a model group definition.
1.2 the {term} property of a particle with {max occurs}=1 which is part of a
pair which constitutes the {content type} of a complex type definition.
2 The {max occurs} of all the particles in the {particles} of the group must
be 0 or 1.

Now here we have two model groups with compositor &quot;all&quot; that appear as part
of a model group with compositor &quot;sequence&quot;, which doesn't satisfy either
1.1 or 1.2 (the sequence is not a &quot;model group definition&quot;, you only get a
&quot;model group definition&quot; from a &lt;group&gt; element in the schema document.). So
this extended model group isn't valid and therefore the schema isn't valid.

I mentioned the rule Schema Component Constraint: Particle Valid (Extension)
but actually we don't get this far. If we did get this far, the rule would
test whether

&lt;sequence&gt;
        &lt;all&gt;
            &lt;element name=&quot;a1&quot; type=&quot;string&quot;/&gt;
            &lt;element name=&quot;a2&quot; type=&quot;string&quot;/&gt;
        &lt;/all&gt;
        &lt;all&gt;
             &lt;element name=&quot;a3&quot; type=&quot;string&quot;/&gt;
        &lt;/all&gt;
&lt;/sequence&gt;

was a valid extension of 

&lt;all&gt;
      &lt;element name=&quot;a1&quot; type=&quot;string&quot;/&gt;
      &lt;element name=&quot;a2&quot; type=&quot;string&quot;/&gt;
&lt;/all&gt;

and as it happens, if it got past the rule at 3.8.6, then it would be.

Regards,

Michael Kay
http://www.saxonica.com/
http://twitter.com/michaelhkay 
</pre>
<span id="received"><dfn>Received on</dfn> Monday, 30 November 2009 16:36:12 GMT</span>
</div>
]]></content></entry><entry><title>RE: Reg. &amp;lt;all&amp;gt; model group extension </title><id>http://xsd.stylusstudio.com/2009Nov/post07001.htm</id><link rel="alternate" type="text/html" href="http://xsd.stylusstudio.com/2009Nov/post07001.htm" /><updated>2009-11-30T15:41:32Z</updated><content type="text/plain"><![CDATA[<pre id="body">
<a name="start17" accesskey="j" id="start17"></a>Look for <a title="Schema" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema.html">Schema</a> Component Constraint: Particle Valid (Extension) in 3.9.6.
Clause 2 says that the {term} must be a sequence group (it cannot be choice
or all).

Regards,

<a title="Interview Michael Kay - W3C XML Member and Founder of Saxonica" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/michael_kay.html">Michael Kay</a>
http://www.saxonica.com/
http://twitter.com/michaelhkay 

&gt; -----Original Message-----
&gt; From: <a href="mailto:xmlschema-dev-request&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;?Subject=RE%3A%20Reg.%20%3Call%3E%20model%20group%20extension&amp;In-Reply-To=%253CD4136F023E38440C82798D296BB9A25B%40Sealion%253E&amp;References=%253CD4136F023E38440C82798D296BB9A25B%40Sealion%253E">xmlschema-dev-request&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;</a> 
&gt; [mailto:<a href="mailto:xmlschema-dev-request&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;?Subject=RE%3A%20Reg.%20%3Call%3E%20model%20group%20extension&amp;In-Reply-To=%253CD4136F023E38440C82798D296BB9A25B%40Sealion%253E&amp;References=%253CD4136F023E38440C82798D296BB9A25B%40Sealion%253E">xmlschema-dev-request&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;</a>] On Behalf Of bharath
&gt; Sent: 30 November 2009 15:23
&gt; To: 'Michael Kay'; 'Pete Cordell'; <a href="mailto:xmlschema-dev&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;?Subject=RE%3A%20Reg.%20%3Call%3E%20model%20group%20extension&amp;In-Reply-To=%253CD4136F023E38440C82798D296BB9A25B%40Sealion%253E&amp;References=%253CD4136F023E38440C82798D296BB9A25B%40Sealion%253E">xmlschema-dev&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;</a>
&gt; Cc: <a href="mailto:rajithr&#x40;&#0104;&#0117;&#0097;&#0119;&#0101;&#0105;&#0046;&#0099;&#0111;&#0109;?Subject=RE%3A%20Reg.%20%3Call%3E%20model%20group%20extension&amp;In-Reply-To=%253CD4136F023E38440C82798D296BB9A25B%40Sealion%253E&amp;References=%253CD4136F023E38440C82798D296BB9A25B%40Sealion%253E">rajithr&#x40;&#0104;&#0117;&#0097;&#0119;&#0101;&#0105;&#0046;&#0099;&#0111;&#0109;</a>; <a href="mailto:arathikarki&#x40;&#0104;&#0117;&#0097;&#0119;&#0101;&#0105;&#0046;&#0099;&#0111;&#0109;?Subject=RE%3A%20Reg.%20%3Call%3E%20model%20group%20extension&amp;In-Reply-To=%253CD4136F023E38440C82798D296BB9A25B%40Sealion%253E&amp;References=%253CD4136F023E38440C82798D296BB9A25B%40Sealion%253E">arathikarki&#x40;&#0104;&#0117;&#0097;&#0119;&#0101;&#0105;&#0046;&#0099;&#0111;&#0109;</a>; <a href="mailto:ksrilakshmi&#x40;&#0104;&#0117;&#0097;&#0119;&#0101;&#0105;&#0046;&#0099;&#0111;&#0109;?Subject=RE%3A%20Reg.%20%3Call%3E%20model%20group%20extension&amp;In-Reply-To=%253CD4136F023E38440C82798D296BB9A25B%40Sealion%253E&amp;References=%253CD4136F023E38440C82798D296BB9A25B%40Sealion%253E">ksrilakshmi&#x40;&#0104;&#0117;&#0097;&#0119;&#0101;&#0105;&#0046;&#0099;&#0111;&#0109;</a>
&gt; Subject: RE: Reg. &lt;all&gt; model group extension
&gt; 
&gt; Hi Pete Cordell/ Michek Kay
&gt; 
&gt; Thanks for your reply. 
&gt; Can you please tell me where I can find this limitation of 
&gt; &lt;all&gt; extension in <a title="xml schema specification" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/w3c/schema0/_index.htm">xml schema specification</a>.
&gt; 
&gt; 
&gt; Thanks and Regards,
&gt; Bharath.
&gt; 
&gt; 
&gt; -----Original Message-----
&gt; From: <a href="mailto:xmlschema-dev-request&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;?Subject=RE%3A%20Reg.%20%3Call%3E%20model%20group%20extension&amp;In-Reply-To=%253CD4136F023E38440C82798D296BB9A25B%40Sealion%253E&amp;References=%253CD4136F023E38440C82798D296BB9A25B%40Sealion%253E">xmlschema-dev-request&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;</a> 
&gt; [mailto:<a href="mailto:xmlschema-dev-request&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;?Subject=RE%3A%20Reg.%20%3Call%3E%20model%20group%20extension&amp;In-Reply-To=%253CD4136F023E38440C82798D296BB9A25B%40Sealion%253E&amp;References=%253CD4136F023E38440C82798D296BB9A25B%40Sealion%253E">xmlschema-dev-request&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;</a>] On Behalf Of Michael Kay
&gt; Sent: Monday, November 30, 2009 8:41 PM
&gt; To: 'Pete Cordell'; 'bharath'; <a href="mailto:xmlschema-dev&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;?Subject=RE%3A%20Reg.%20%3Call%3E%20model%20group%20extension&amp;In-Reply-To=%253CD4136F023E38440C82798D296BB9A25B%40Sealion%253E&amp;References=%253CD4136F023E38440C82798D296BB9A25B%40Sealion%253E">xmlschema-dev&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;</a>
&gt; Cc: <a href="mailto:rajithr&#x40;&#0104;&#0117;&#0097;&#0119;&#0101;&#0105;&#0046;&#0099;&#0111;&#0109;?Subject=RE%3A%20Reg.%20%3Call%3E%20model%20group%20extension&amp;In-Reply-To=%253CD4136F023E38440C82798D296BB9A25B%40Sealion%253E&amp;References=%253CD4136F023E38440C82798D296BB9A25B%40Sealion%253E">rajithr&#x40;&#0104;&#0117;&#0097;&#0119;&#0101;&#0105;&#0046;&#0099;&#0111;&#0109;</a>; <a href="mailto:arathikarki&#x40;&#0104;&#0117;&#0097;&#0119;&#0101;&#0105;&#0046;&#0099;&#0111;&#0109;?Subject=RE%3A%20Reg.%20%3Call%3E%20model%20group%20extension&amp;In-Reply-To=%253CD4136F023E38440C82798D296BB9A25B%40Sealion%253E&amp;References=%253CD4136F023E38440C82798D296BB9A25B%40Sealion%253E">arathikarki&#x40;&#0104;&#0117;&#0097;&#0119;&#0101;&#0105;&#0046;&#0099;&#0111;&#0109;</a>
&gt; Subject: RE: Reg. &lt;all&gt; model group extension
&gt; 
&gt;  
&gt; &gt; 
&gt; &gt; I don't believe you are allowed to extend xs:all in XSD 1.0.  
&gt; &gt; This has been relaxed in the upcoming 1.1.
&gt; 
&gt; Correct (thanks for spotting this, Pete).
&gt; 
&gt; After fixing a couple of typos (bad XML end tags), I get the 
&gt; following from Saxon 9.2 running with -xsdversion:1.0:
&gt; 
&gt; Error on line 15 of test.xsd:
&gt;   The type DerivedType is defined with xs:all so (in XSD 1.0) 
&gt; it cannot be derived by
&gt;   extension from a non-empty type
&gt; Schema processing failed: The schema is invalid
&gt; 
&gt; but with -xsdversion:1.1 I get:
&gt; 
&gt; Schema checking successful.
&gt; 
&gt; Regards,
&gt; 
&gt; Michael Kay
&gt; http://www.saxonica.com/
&gt; http://twitter.com/michaelhkay 
&gt; 
&gt; 
&gt; 
</pre>
<span id="received"><dfn>Received on</dfn> Monday, 30 November 2009 15:42:05 GMT</span>
</div>
]]></content></entry><entry><title>RE: Reg. &amp;lt;all&amp;gt; model group extension </title><id>http://xsd.stylusstudio.com/2009Nov/post05001.htm</id><link rel="alternate" type="text/html" href="http://xsd.stylusstudio.com/2009Nov/post05001.htm" /><updated>2009-11-30T15:11:09Z</updated><content type="text/plain"><![CDATA[<pre id="body">
<a name="start15" accesskey="j" id="start15"></a> 
&gt; 
&gt; I don't believe you are allowed to extend <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema_editor.html">xs:all</a> in <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema.html">XSD</a> 1.0.  
&gt; This has been relaxed in the upcoming 1.1.

Correct (thanks for spotting this, Pete).

After fixing a couple of typos (bad <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">XML</a> end tags), I get the following from
<a title="Saxon" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/saxon_xquery_processor.html">Saxon</a> 9.2 running with -xsdversion:1.0:

Error on line 15 of test.xsd:
  The type DerivedType is defined with xs:all so (in XSD 1.0) it cannot be
derived by
  extension from a non-empty type
Schema processing failed: The schema is invalid

but with -xsdversion:1.1 I get:

Schema checking successful.

Regards,

<a title="Interview Michael Kay - W3C XML Member and Founder of Saxonica" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/michael_kay.html">Michael Kay</a>
http://www.saxonica.com/
http://twitter.com/michaelhkay 
</pre>
<span id="received"><dfn>Received on</dfn> Monday, 30 November 2009 15:11:41 GMT</span>
</div>
]]></content></entry><entry><title>Re: Reg. &amp;lt;all&amp;gt; model group extension </title><id>http://xsd.stylusstudio.com/2009Nov/post04001.htm</id><link rel="alternate" type="text/html" href="http://xsd.stylusstudio.com/2009Nov/post04001.htm" /><updated>2009-11-30T14:41:06Z</updated><content type="text/plain"><![CDATA[<pre id="body">
<a name="start14" accesskey="j" id="start14"></a>I don't believe you are allowed to extend <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema_editor.html">xs:all</a> in <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema.html">XSD</a> 1.0.  This has been 
relaxed in the upcoming 1.1.

That said, even by Daniel Veillard's own admission, the <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">XML</a> schema 
processing in libxml2 is patchy, so it's worth trying on another schema 
processor.

HTH,

Pete Cordell
Codalogic Ltd
Interface XML to C++ the easy way using XML C++
<a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/jaxb.html">data binding</a> to <a title="convert" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/convert_to_xml.html">convert</a> XSD schemas to C++ classes.
Visit http://codalogic.com/lmx/ or http://www.xml2cpp.com
for more info
----- Original Message ----- 
From: &quot;bharath&quot; &lt;<a href="mailto:bharathkr&#x40;&#0104;&#0117;&#0097;&#0119;&#0101;&#0105;&#0046;&#0099;&#0111;&#0109;?Subject=Re%3A%20Reg.%20%3Call%3E%20model%20group%20extension&amp;In-Reply-To=%253CD3FF0BD59ADE4D6C98828AF5079863AD%40Codalogic%253E&amp;References=%253CD3FF0BD59ADE4D6C98828AF5079863AD%40Codalogic%253E">bharathkr&#x40;&#0104;&#0117;&#0097;&#0119;&#0101;&#0105;&#0046;&#0099;&#0111;&#0109;</a>&gt;
To: &quot;'<a title="Interview Michael Kay - W3C XML Member and Founder of Saxonica" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/michael_kay.html">Michael Kay</a>'&quot; &lt;<a href="mailto:mike&#x40;&#0115;&#0097;&#0120;&#0111;&#0110;&#0105;&#0099;&#0097;&#0046;&#0099;&#0111;&#0109;?Subject=Re%3A%20Reg.%20%3Call%3E%20model%20group%20extension&amp;In-Reply-To=%253CD3FF0BD59ADE4D6C98828AF5079863AD%40Codalogic%253E&amp;References=%253CD3FF0BD59ADE4D6C98828AF5079863AD%40Codalogic%253E">mike&#x40;&#0115;&#0097;&#0120;&#0111;&#0110;&#0105;&#0099;&#0097;&#0046;&#0099;&#0111;&#0109;</a>&gt;; &lt;<a href="mailto:xmlschema-dev&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;?Subject=Re%3A%20Reg.%20%3Call%3E%20model%20group%20extension&amp;In-Reply-To=%253CD3FF0BD59ADE4D6C98828AF5079863AD%40Codalogic%253E&amp;References=%253CD3FF0BD59ADE4D6C98828AF5079863AD%40Codalogic%253E">xmlschema-dev&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;</a>&gt;
Cc: &lt;<a href="mailto:rajithr&#x40;&#0104;&#0117;&#0097;&#0119;&#0101;&#0105;&#0046;&#0099;&#0111;&#0109;?Subject=Re%3A%20Reg.%20%3Call%3E%20model%20group%20extension&amp;In-Reply-To=%253CD3FF0BD59ADE4D6C98828AF5079863AD%40Codalogic%253E&amp;References=%253CD3FF0BD59ADE4D6C98828AF5079863AD%40Codalogic%253E">rajithr&#x40;&#0104;&#0117;&#0097;&#0119;&#0101;&#0105;&#0046;&#0099;&#0111;&#0109;</a>&gt;; &lt;<a href="mailto:arathikarki&#x40;&#0104;&#0117;&#0097;&#0119;&#0101;&#0105;&#0046;&#0099;&#0111;&#0109;?Subject=Re%3A%20Reg.%20%3Call%3E%20model%20group%20extension&amp;In-Reply-To=%253CD3FF0BD59ADE4D6C98828AF5079863AD%40Codalogic%253E&amp;References=%253CD3FF0BD59ADE4D6C98828AF5079863AD%40Codalogic%253E">arathikarki&#x40;&#0104;&#0117;&#0097;&#0119;&#0101;&#0105;&#0046;&#0099;&#0111;&#0109;</a>&gt;
Sent: Monday, November 30, 2009 2:26 PM
Subject: RE: Reg. &lt;all&gt; model group extension


&gt; Hi..
&gt; I am getting error in libxml2 as well as altova spy saying that
&gt;
&gt; &quot;An all modelgroup is neither allowed in complexType definition
&gt; &quot;tns:BaseType&quot; nor in its extension tns: DerivedType&quot;. &quot;
&gt;
&gt; Can you please lookinto this schema whether it is valid or not.
&gt;
&gt;
&gt; Thanks and Regards,
&gt; Bharath.
&gt;
&gt;
&gt; htipl
&gt; HUAWEI TECHNOLOGIES CO.,LTD.  huawei_logo
&gt; &lt;file:///C:/Documents%20and%20Settings/b72392/Application%20Data/Microsoft/S
&gt; ignatures/outlook_huawei_logo_en.jpg&gt;
&gt;
&gt;
&gt; Address: Huawei Industrial Base
&gt; Bantian Longgang
&gt; Shenzhen 518129, P.R.China
&gt; www.huawei.com
&gt; ----------------------------------------------------------------------------
&gt; ---------------------------------------------------------
&gt; This e-mail and its attachments contain confidential information from
&gt; HUAWEI, which
&gt; is intended only for the person or entity whose address is listed above. 
&gt; Any
&gt; use of the
&gt; information contained herein in any way (including, but not limited to,
&gt; total or partial
&gt; disclosure, reproduction, or dissemination) by persons other than the
&gt; intended
&gt; recipient(s) is prohibited. If you receive this e-mail in error, please
&gt; notify the sender by
&gt; phone or email immediately and delete it!
&gt;
&gt;
&gt;
&gt;  _____
&gt;
&gt; From: Michael Kay [mailto:<a href="mailto:mike&#x40;&#0115;&#0097;&#0120;&#0111;&#0110;&#0105;&#0099;&#0097;&#0046;&#0099;&#0111;&#0109;?Subject=Re%3A%20Reg.%20%3Call%3E%20model%20group%20extension&amp;In-Reply-To=%253CD3FF0BD59ADE4D6C98828AF5079863AD%40Codalogic%253E&amp;References=%253CD3FF0BD59ADE4D6C98828AF5079863AD%40Codalogic%253E">mike&#x40;&#0115;&#0097;&#0120;&#0111;&#0110;&#0105;&#0099;&#0097;&#0046;&#0099;&#0111;&#0109;</a>]
&gt; Sent: Monday, November 30, 2009 7:36 PM
&gt; To: 'bharath'; <a href="mailto:xmlschema-dev&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;?Subject=Re%3A%20Reg.%20%3Call%3E%20model%20group%20extension&amp;In-Reply-To=%253CD3FF0BD59ADE4D6C98828AF5079863AD%40Codalogic%253E&amp;References=%253CD3FF0BD59ADE4D6C98828AF5079863AD%40Codalogic%253E">xmlschema-dev&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;</a>
&gt; Cc: <a href="mailto:rajithr&#x40;&#0104;&#0117;&#0097;&#0119;&#0101;&#0105;&#0046;&#0099;&#0111;&#0109;?Subject=Re%3A%20Reg.%20%3Call%3E%20model%20group%20extension&amp;In-Reply-To=%253CD3FF0BD59ADE4D6C98828AF5079863AD%40Codalogic%253E&amp;References=%253CD3FF0BD59ADE4D6C98828AF5079863AD%40Codalogic%253E">rajithr&#x40;&#0104;&#0117;&#0097;&#0119;&#0101;&#0105;&#0046;&#0099;&#0111;&#0109;</a>; <a href="mailto:arathikarki&#x40;&#0104;&#0117;&#0097;&#0119;&#0101;&#0105;&#0046;&#0099;&#0111;&#0109;?Subject=Re%3A%20Reg.%20%3Call%3E%20model%20group%20extension&amp;In-Reply-To=%253CD3FF0BD59ADE4D6C98828AF5079863AD%40Codalogic%253E&amp;References=%253CD3FF0BD59ADE4D6C98828AF5079863AD%40Codalogic%253E">arathikarki&#x40;&#0104;&#0117;&#0097;&#0119;&#0101;&#0105;&#0046;&#0099;&#0111;&#0109;</a>
&gt; Subject: RE: Reg. &lt;all&gt; model group extension
&gt;
&gt;
&gt; It looks OK to me by visual inspection - I haven't tried running it.
&gt;
&gt; Why do you doubt that it's OK?
&gt;
&gt; Regards,
&gt;
&gt; Michael Kay
&gt; http://www.saxonica.com/
&gt; http://twitter.com/michaelhkay
&gt;
&gt;
&gt;
&gt;
&gt;
&gt;  _____
&gt;
&gt; From: <a href="mailto:xmlschema-dev-request&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;?Subject=Re%3A%20Reg.%20%3Call%3E%20model%20group%20extension&amp;In-Reply-To=%253CD3FF0BD59ADE4D6C98828AF5079863AD%40Codalogic%253E&amp;References=%253CD3FF0BD59ADE4D6C98828AF5079863AD%40Codalogic%253E">xmlschema-dev-request&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;</a> [mailto:<a href="mailto:xmlschema-dev-request&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;?Subject=Re%3A%20Reg.%20%3Call%3E%20model%20group%20extension&amp;In-Reply-To=%253CD3FF0BD59ADE4D6C98828AF5079863AD%40Codalogic%253E&amp;References=%253CD3FF0BD59ADE4D6C98828AF5079863AD%40Codalogic%253E">xmlschema-dev-request&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;</a>] 
&gt; On
&gt; Behalf Of bharath
&gt; Sent: 30 November 2009 13:55
&gt; To: <a href="mailto:xmlschema-dev&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;?Subject=Re%3A%20Reg.%20%3Call%3E%20model%20group%20extension&amp;In-Reply-To=%253CD3FF0BD59ADE4D6C98828AF5079863AD%40Codalogic%253E&amp;References=%253CD3FF0BD59ADE4D6C98828AF5079863AD%40Codalogic%253E">xmlschema-dev&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;</a>
&gt; Cc: <a href="mailto:rajithr&#x40;&#0104;&#0117;&#0097;&#0119;&#0101;&#0105;&#0046;&#0099;&#0111;&#0109;?Subject=Re%3A%20Reg.%20%3Call%3E%20model%20group%20extension&amp;In-Reply-To=%253CD3FF0BD59ADE4D6C98828AF5079863AD%40Codalogic%253E&amp;References=%253CD3FF0BD59ADE4D6C98828AF5079863AD%40Codalogic%253E">rajithr&#x40;&#0104;&#0117;&#0097;&#0119;&#0101;&#0105;&#0046;&#0099;&#0111;&#0109;</a>; <a href="mailto:arathikarki&#x40;&#0104;&#0117;&#0097;&#0119;&#0101;&#0105;&#0046;&#0099;&#0111;&#0109;?Subject=Re%3A%20Reg.%20%3Call%3E%20model%20group%20extension&amp;In-Reply-To=%253CD3FF0BD59ADE4D6C98828AF5079863AD%40Codalogic%253E&amp;References=%253CD3FF0BD59ADE4D6C98828AF5079863AD%40Codalogic%253E">arathikarki&#x40;&#0104;&#0117;&#0097;&#0119;&#0101;&#0105;&#0046;&#0099;&#0111;&#0109;</a>
&gt; Subject: Reg. &lt;all&gt; model group extension
&gt;
&gt;
&gt; Hi All,
&gt;
&gt; I have one doubt reg. &lt;all&gt; model group extension.
&gt;
&gt; i have the following schema.
&gt;
&gt; &lt;schema targetNamespace=&quot;testschema&quot; xmlns:tns=&quot;testschema&quot;&gt;
&gt;    &lt;complexType name=&quot;BaseType&quot;&gt;
&gt;        &lt;all&gt;
&gt;            &lt;element name=&quot;a1&quot; type=&quot;string&quot;/&gt;
&gt;
&gt;            &lt;element name=&quot;a2&quot; type=&quot;string&quot;/&gt;
&gt;        &lt;/all&gt;
&gt;    &lt;/complexType&gt;
&gt;
&gt;    &lt;complexType name=&quot;DerivedType&quot;&gt;
&gt;        &lt;complexContent&gt;
&gt;          &lt;extension base=&quot;tns:BaseType&quot;&gt;
&gt;            &lt;all&gt;
&gt;                &lt;element name=&quot;a3&quot; type=&quot;string&quot;/&gt;
&gt;            &lt;/all&gt;
&gt;        &lt;extension&gt;
&gt;        &lt;/complexContent&gt;
&gt;    &lt;complexType&gt;
&gt;
&gt; &lt;/schema&gt;
&gt;
&gt; Is this extension of the &lt;all&gt; model group correct??
&gt; If not please provide me the reason. Please reply me as soon as possible.
&gt;
&gt;
&gt; Thanks and Regards,
&gt; Bharath.
&gt;
&gt; 
</pre>
<span id="received"><dfn>Received on</dfn> Monday, 30 November 2009 14:41:47 GMT</span>
</div>
]]></content></entry><entry><title>RE: Reg. &amp;lt;all&amp;gt; model group extension </title><id>http://xsd.stylusstudio.com/2009Nov/post02001.htm</id><link rel="alternate" type="text/html" href="http://xsd.stylusstudio.com/2009Nov/post02001.htm" /><updated>2009-11-30T14:06:16Z</updated><content type="text/plain"><![CDATA[<pre id="body">
<a name="start12" accesskey="j" id="start12"></a>It looks OK to me by visual inspection - I haven't tried running it.
 
Why do you doubt that it's OK? 

Regards,

<a title="Interview Michael Kay - W3C XML Member and Founder of Saxonica" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/michael_kay.html">Michael Kay</a>
http://www.saxonica.com/
http://twitter.com/michaelhkay 

 
 


  _____  

From: <a href="mailto:xmlschema-dev-request&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;?Subject=RE%3A%20Reg.%20%3Call%3E%20model%20group%20extension&amp;In-Reply-To=%253CA7376D9E4C524CF594A541479AAF3EF8%40Sealion%253E&amp;References=%253CA7376D9E4C524CF594A541479AAF3EF8%40Sealion%253E">xmlschema-dev-request&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;</a> [mailto:<a href="mailto:xmlschema-dev-request&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;?Subject=RE%3A%20Reg.%20%3Call%3E%20model%20group%20extension&amp;In-Reply-To=%253CA7376D9E4C524CF594A541479AAF3EF8%40Sealion%253E&amp;References=%253CA7376D9E4C524CF594A541479AAF3EF8%40Sealion%253E">xmlschema-dev-request&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;</a>] On
Behalf Of bharath
Sent: 30 November 2009 13:55
To: <a href="mailto:xmlschema-dev&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;?Subject=RE%3A%20Reg.%20%3Call%3E%20model%20group%20extension&amp;In-Reply-To=%253CA7376D9E4C524CF594A541479AAF3EF8%40Sealion%253E&amp;References=%253CA7376D9E4C524CF594A541479AAF3EF8%40Sealion%253E">xmlschema-dev&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;</a>
Cc: <a href="mailto:rajithr&#x40;&#0104;&#0117;&#0097;&#0119;&#0101;&#0105;&#0046;&#0099;&#0111;&#0109;?Subject=RE%3A%20Reg.%20%3Call%3E%20model%20group%20extension&amp;In-Reply-To=%253CA7376D9E4C524CF594A541479AAF3EF8%40Sealion%253E&amp;References=%253CA7376D9E4C524CF594A541479AAF3EF8%40Sealion%253E">rajithr&#x40;&#0104;&#0117;&#0097;&#0119;&#0101;&#0105;&#0046;&#0099;&#0111;&#0109;</a>; <a href="mailto:arathikarki&#x40;&#0104;&#0117;&#0097;&#0119;&#0101;&#0105;&#0046;&#0099;&#0111;&#0109;?Subject=RE%3A%20Reg.%20%3Call%3E%20model%20group%20extension&amp;In-Reply-To=%253CA7376D9E4C524CF594A541479AAF3EF8%40Sealion%253E&amp;References=%253CA7376D9E4C524CF594A541479AAF3EF8%40Sealion%253E">arathikarki&#x40;&#0104;&#0117;&#0097;&#0119;&#0101;&#0105;&#0046;&#0099;&#0111;&#0109;</a>
Subject: Reg. &lt;all&gt; model group extension


Hi All,
 
I have one doubt reg. &lt;all&gt; model group extension.
 
i have the following <a title="schema" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema.html">schema</a>. 
 
&lt;schema targetNamespace=&quot;testschema&quot; xmlns:tns=&quot;testschema&quot;&gt;
    &lt;complexType name=&quot;BaseType&quot;&gt;
        &lt;all&gt;
            &lt;element name=&quot;a1&quot; type=&quot;string&quot;/&gt;

            &lt;element name=&quot;a2&quot; type=&quot;string&quot;/&gt;
        &lt;/all&gt;
    &lt;/complexType&gt;
 
    &lt;complexType name=&quot;DerivedType&quot;&gt;
        &lt;complexContent&gt;
          &lt;extension base=&quot;tns:BaseType&quot;&gt;
            &lt;all&gt;
                &lt;element name=&quot;a3&quot; type=&quot;string&quot;/&gt;
            &lt;/all&gt;
        &lt;extension&gt;
        &lt;/complexContent&gt;
    &lt;complexType&gt;
 
&lt;/schema&gt;
 
Is this extension of the &lt;all&gt; model group correct?? 
If not please provide me the reason. Please reply me as soon as possible.
 
 
Thanks and Regards,
Bharath.
</pre>
<span id="received"><dfn>Received on</dfn> Monday, 30 November 2009 14:06:51 GMT</span>
</div>
]]></content></entry><entry><title>[ANN] Python XML Schema Bindings 1.0.0 </title><id>http://xsd.stylusstudio.com/2009Nov/post00001.htm</id><link rel="alternate" type="text/html" href="http://xsd.stylusstudio.com/2009Nov/post00001.htm" /><updated>2009-11-18T17:03:52Z</updated><content type="text/plain"><![CDATA[<pre id="body">
<a name="start10" accesskey="j" id="start10"></a>(If the maintainer of http://www.w3.org/XML/Schema#Tools would be so 
kind as to add the link to PyXB's home page, I'd appreciate it.  Thanks.)

PyXB version 1.0.0 is now available from SourceForge at: 
http://sourceforge.net/projects/pyxb/

PyXB (Python XML Schema <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/jaxb.html">Bindings</a>; &quot;pixbee&quot;) is a pure Python package 
that generates Python source code for classes that correspond to data 
structures <a title="XML Schema Tutorial" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/videos/xmlschema1/xmlschema1.html">defined by XMLSchema</a>.  In concept it is similar to JAXB for 
<a title="Java" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/configure_jre.html">Java</a> and CodeSynthesis XSD for C++.  The current release supports <a title="XML Schema" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema.html">XML 
Schema 1.0</a>.

Version 1.0.0 is feature-complete and suitable for production 
development where validation of incoming and generated documents is 
desired.  The following schema constructs are supported:

   * Class constants corresponding to string enumeration constraints
   * Simple and complex type definitions
   * List and union <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/schema_aware.html">datatypes</a>
   * Constraints on (simple) datatypes (e.g., minInclusive, length)
   * Model groups and attribute groups
   * Complex content models (all, sequence, choice); minOccurs and 
maxOccurs
   * Abstract types, xsi:type, substitution groups
   * Nillable elements with xsi:nil
   * Namespace qualified attributes and elements
   * Documentation annotations present in the schema are converted to 
Python docstrings in the generated bindings.
   * Pattern constraints (as long as the simple type derives from 
something that is represented as a Python string)

The full distribution includes generated bindings for twenty-three 
namespaces related to web services (including several versions of <a title="WSDL Viewer" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/webservices/wsdl_editor.html">SOAP 
and WSDL</a>), and twenty-eight namespaces from the Open Geospatial 
Consortium's Geographic Information System schema.

For further information and links to the support forum and <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/feeds/">mailing list</a>, 
please consult the documentation available at: http://pyxb.sourceforge.net/

Peter
</pre>
<span id="received"><dfn>Received on</dfn> Thursday, 19 November 2009 10:39:57 GMT</span>
</div>
]]></content></entry><entry><title>A plea to XSD 1.1 vendors: provide a &amp;quot;switch&amp;quot; to turn on/off  vendor-unique extensions </title><id>http://xsd.stylusstudio.com/2009Nov/post09000.htm</id><link rel="alternate" type="text/html" href="http://xsd.stylusstudio.com/2009Nov/post09000.htm" /><updated>2009-11-18T15:29:49Z</updated><content type="text/plain"><![CDATA[<pre id="body">
<a name="start9" accesskey="j" id="start9"></a>
Hi Folks,

In <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema.html">XSD</a> 1.1 vendors are allowed to extend the language with additional (vendor-unique) <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/schema_aware.html">datatypes</a> and facets. 

Example: In some countries the decimal point symbol is the comma; so a vendor may provide a new decimal datatype and a new facet for specifying the decimal point symbol:

&lt;<a title="xs:simpleType" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema_editor.html">xs:simpleType</a> name=&quot;money&quot;&gt;    
      &lt;xs:restriction base=&quot;vendor:decimal&quot;&gt;        
            &lt;vendor:delimiter value=&quot;,&quot; /&gt;    
      &lt;xs:restriction&gt;
&lt;/xs:simpleType&gt;

This is very useful. 

However, this capability represents an uncertainty in what things are in the language (&quot;If you're <a title="using this XSD 1.1" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/videos/xmlschema1/xmlschema1.html">using this XSD 1.1</a> <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml/editor/">tool</a> then these x,y,z things are in the language, if you're using that XSD 1.1 tool then these a,b,c things are in the language&quot;). For some of my clients:

     uncertainty = risk

For those clients, risk must be mitigated.

Thus, I issue a plea to all XSD 1.1 vendors: please provide a switch to turn on/off vendor-unique extensions. 
 
I believe that providing a switch to turn on/off vendor-unique extension will give vendors a market advantage.

Thanks for your time.

/Roger
</pre>
<span id="received"><dfn>Received on</dfn> Wednesday, 18 November 2009 20:30:23 GMT</span>
</div>
]]></content></entry><entry><title>Re: Naming in Override Constraints and Semantics </title><id>http://xsd.stylusstudio.com/2009Nov/post08000.htm</id><link rel="alternate" type="text/html" href="http://xsd.stylusstudio.com/2009Nov/post08000.htm" /><updated>2009-11-11T15:02:12Z</updated><content type="text/plain"><![CDATA[<pre id="body">
<a name="start8" accesskey="j" id="start8"></a>Thanks Henry.  Just done.

As I know the WG is not looking for extra work I thought I'd post to the 
public list so that members have a low procedure way to object to the 
comment if I've really missed the point!  That said, I think it's a simple 
and useful change to make.

Thanks again,

Pete.
--
=============================================
Pete Cordell
Codalogic Ltd
Interface <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">XML</a> to C++ the easy way using XML C++
<a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/jaxb.html">data binding</a> to <a title="convert" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/convert_to_xml.html">convert</a> <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema.html">XSD</a> schemas to C++ classes.
Visit http://codalogic.com/lmx/ or http://www.xml2cpp.com
for more info
=============================================

----- Original Message ----- 
From: &quot;Henry S. Thompson&quot; &lt;<a href="mailto:ht&#x40;&#0105;&#0110;&#0102;&#0046;&#0101;&#0100;&#0046;&#0097;&#0099;&#0046;&#0117;&#0107;?Subject=Re%3A%20Naming%20in%20Override%20Constraints%20and%20Semantics&amp;In-Reply-To=%253C1BAC5E4644FF46FF9F4C542722914FC7%40Codalogic%253E&amp;References=%253C1BAC5E4644FF46FF9F4C542722914FC7%40Codalogic%253E">ht&#x40;&#0105;&#0110;&#0102;&#0046;&#0101;&#0100;&#0046;&#0097;&#0099;&#0046;&#0117;&#0107;</a>&gt;
To: &quot;Pete Cordell&quot; &lt;<a href="mailto:petexmldev&#x40;&#0099;&#0111;&#0100;&#0097;&#0108;&#0111;&#0103;&#0105;&#0099;&#0046;&#0099;&#0111;&#0109;?Subject=Re%3A%20Naming%20in%20Override%20Constraints%20and%20Semantics&amp;In-Reply-To=%253C1BAC5E4644FF46FF9F4C542722914FC7%40Codalogic%253E&amp;References=%253C1BAC5E4644FF46FF9F4C542722914FC7%40Codalogic%253E">petexmldev&#x40;&#0099;&#0111;&#0100;&#0097;&#0108;&#0111;&#0103;&#0105;&#0099;&#0046;&#0099;&#0111;&#0109;</a>&gt;
Cc: &lt;<a href="mailto:xmlschema-dev&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;?Subject=Re%3A%20Naming%20in%20Override%20Constraints%20and%20Semantics&amp;In-Reply-To=%253C1BAC5E4644FF46FF9F4C542722914FC7%40Codalogic%253E&amp;References=%253C1BAC5E4644FF46FF9F4C542722914FC7%40Codalogic%253E">xmlschema-dev&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;</a>&gt;
Sent: Wednesday, November 11, 2009 9:40 AM
Subject: Re: Naming in Override Constraints and Semantics



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Requests for changes to the spec should go to
<a href="mailto:www-xml-schema-comments&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;?Subject=Re%3A%20Naming%20in%20Override%20Constraints%20and%20Semantics&amp;In-Reply-To=%253C1BAC5E4644FF46FF9F4C542722914FC7%40Codalogic%253E&amp;References=%253C1BAC5E4644FF46FF9F4C542722914FC7%40Codalogic%253E">www-xml-schema-comments&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;</a> or into Buzilla -- they may get
overlooked if they are only sent here.

I'd suggest you reduce the length of your requested new names, to,
say, Dold and Dnew. . .

ht
- -- 
       Henry S. Thompson, School of Informatics, University of Edinburgh
                         Half-time member of <a title="W3C" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/w3c/">W3C</a> Team
      10 Crichton Street, Edinburgh EH8 9AB, SCOTLAND -- (44) 131 650-4440
                Fax: (44) 131 651-1426, e-mail: <a href="mailto:ht&#x40;&#0105;&#0110;&#0102;&#0046;&#0101;&#0100;&#0046;&#0097;&#0099;&#0046;&#0117;&#0107;?Subject=Re%3A%20Naming%20in%20Override%20Constraints%20and%20Semantics&amp;In-Reply-To=%253C1BAC5E4644FF46FF9F4C542722914FC7%40Codalogic%253E&amp;References=%253C1BAC5E4644FF46FF9F4C542722914FC7%40Codalogic%253E">ht&#x40;&#0105;&#0110;&#0102;&#0046;&#0101;&#0100;&#0046;&#0097;&#0099;&#0046;&#0117;&#0107;</a>
                       URL: http://www.ltg.ed.ac.uk/~ht/
[mail really from me _always_ has this .sig -- mail without it is forged 
spam]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)

iD8DBQFK+oaRkjnJixAXWBoRAjCyAJ9xWKNKnDOdCgsVHifHkSH+r5oDdwCcCsMy
6PycvCIKjDgwQwoHHLQRtSM=
=045d
-----END PGP SIGNATURE-----
</pre>
<span id="received"><dfn>Received on</dfn> Wednesday, 11 November 2009 15:02:48 GMT</span>
</div>
]]></content></entry><entry><title>Re: Naming in Override Constraints and Semantics </title><id>http://xsd.stylusstudio.com/2009Nov/post07000.htm</id><link rel="alternate" type="text/html" href="http://xsd.stylusstudio.com/2009Nov/post07000.htm" /><updated>2009-11-11T09:40:29Z</updated><content type="text/plain"><![CDATA[<pre id="body">
<a name="start7" accesskey="j" id="start7"></a>-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Requests for changes to the spec should go to
<a href="mailto:www-xml-schema-comments&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;?Subject=Re%3A%20Naming%20in%20Override%20Constraints%20and%20Semantics&amp;In-Reply-To=%253Cf5bbpj9e6wi.fsf%40hildegard.inf.ed.ac.uk%253E&amp;References=%253Cf5bbpj9e6wi.fsf%40hildegard.inf.ed.ac.uk%253E">www-xml-schema-comments&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;</a> or into Buzilla -- they may get
overlooked if they are only sent here.

I'd suggest you reduce the length of your requested new names, to,
say, Dold and Dnew. . .

ht
- -- 
       Henry S. Thompson, School of Informatics, University of Edinburgh
                         Half-time member of <a title="W3C" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/w3c/">W3C</a> Team
      10 Crichton Street, Edinburgh EH8 9AB, SCOTLAND -- (44) 131 650-4440
                Fax: (44) 131 651-1426, e-mail: <a href="mailto:ht&#x40;&#0105;&#0110;&#0102;&#0046;&#0101;&#0100;&#0046;&#0097;&#0099;&#0046;&#0117;&#0107;?Subject=Re%3A%20Naming%20in%20Override%20Constraints%20and%20Semantics&amp;In-Reply-To=%253Cf5bbpj9e6wi.fsf%40hildegard.inf.ed.ac.uk%253E&amp;References=%253Cf5bbpj9e6wi.fsf%40hildegard.inf.ed.ac.uk%253E">ht&#x40;&#0105;&#0110;&#0102;&#0046;&#0101;&#0100;&#0046;&#0097;&#0099;&#0046;&#0117;&#0107;</a>
                       URL: http://www.ltg.ed.ac.uk/~ht/
[mail really from me _always_ has this .sig -- mail without it is forged spam]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)

iD8DBQFK+oaRkjnJixAXWBoRAjCyAJ9xWKNKnDOdCgsVHifHkSH+r5oDdwCcCsMy
6PycvCIKjDgwQwoHHLQRtSM=
=045d
-----END PGP SIGNATURE-----
</pre>
<span id="received"><dfn>Received on</dfn> Wednesday, 11 November 2009 09:41:13 GMT</span>
</div>
]]></content></entry><entry><title>Naming in Override Constraints and Semantics </title><id>http://xsd.stylusstudio.com/2009Nov/post06000.htm</id><link rel="alternate" type="text/html" href="http://xsd.stylusstudio.com/2009Nov/post06000.htm" /><updated>2009-11-10T17:57:56Z</updated><content type="text/plain"><![CDATA[<pre id="body">
<a name="start6" accesskey="j" id="start6"></a>In &quot;<a title="Schema" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema.html">Schema</a> Representation Constraint: Override Constraints and Semantics&quot;, 
is there any chance that:

- D1 could be changed to Doverridden and
- D2 could be changed to Doverriding?

Then:

2 One of the following must be true:
2.1 D2 has a targetNamespace [attribute], and its ·actual value· is 
identical to the ·actual value· of the targetNamespace [attribute] of D1 
(which must have such an [attribute]).
2.2 Neither D2 nor D1 have a targetNamespace [attribute].
2.3 D2 has no targetNamespace [attribute] (but D1 does).

becomes:

2 One of the following must be true:
2.1 Doverriding has a targetNamespace [attribute], and its ·actual value· is 
identical to the ·actual value· of the targetNamespace [attribute] of 
Doverridden (which must have such an [attribute]).
2.2 Neither Doverriding nor Doverridden have a targetNamespace [attribute].
2.3 Doverriding has no targetNamespace [attribute] (but Doverridden does).

This is a lot easier on the old brain!

There are possibly similar name changes that could be made that would make 
the life of the reader much easier.

Thanks,

Pete.
--
=============================================
Pete Cordell
Codalogic Ltd
Interface <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">XML</a> to C++ the easy way using XML C++
<a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/jaxb.html">data binding</a> to <a title="convert" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/convert_to_xml.html">convert</a> XSD schemas to C++ classes.
Visit http://codalogic.com/lmx/ or http://www.xml2cpp.com
for more info
=============================================
</pre>
<span id="received"><dfn>Received on</dfn> Tuesday, 10 November 2009 17:58:55 GMT</span>
</div>
]]></content></entry><entry><title>RE: Possible to restrict top-level xs:element names? </title><id>http://xsd.stylusstudio.com/2009Nov/post05000.htm</id><link rel="alternate" type="text/html" href="http://xsd.stylusstudio.com/2009Nov/post05000.htm" /><updated>2009-11-07T14:24:52Z</updated><content type="text/plain"><![CDATA[<pre id="body">
<a name="start5" accesskey="j" id="start5"></a>Thank you all for your valuable feedback. I think Henry put it most
succintly:

&quot;The spec doesn't provide a mechanism by which a <a title="schema" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema.html">schema</a> can constrain the
document element of schema-valid documents.&quot;

That's what I was wanting to know. I apologise if I used confusing
terminology in trying to explain my problem!

Regards,

Richard.
-- 
View this message in context: http://old.nabble.com/Possible-to-restrict-top-level-xs%3Aelement-names--tp26227610p26249237.html
Sent from the <a title="w3" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/w3c/">w3</a>.org - <a title="xmlschema-dev" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://xsd.stylusstudio.com">xmlschema-dev</a> <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/feeds/">mailing list</a> archive at Nabble.com.
</pre>
<span id="received"><dfn>Received on</dfn> Saturday,  7 November 2009 22:26:09 GMT</span>
</div>
]]></content></entry><entry><title>RE: Possible to restrict top-level xs:element names? </title><id>http://xsd.stylusstudio.com/2009Nov/post04000.htm</id><link rel="alternate" type="text/html" href="http://xsd.stylusstudio.com/2009Nov/post04000.htm" /><updated>2009-11-07T10:25:13Z</updated><content type="text/plain"><![CDATA[<pre id="body">
<a name="start4" accesskey="j" id="start4"></a>&gt;    (b) make sure your processor distinguishes between elements
&gt;        with [validity]=invalid and those with [validity]=notKnown
&gt;        (again, how you do this is between you and your processor,
&gt;        and out of scope for the <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema.html">XSD</a> spec); and

You might like to note that <a title="Saxon's schema processor" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/saxon_xslt_processor.html">Saxon's schema processor</a>, and perhaps some other
products, expose this distinction by allowing you to select &quot;strict&quot; or
&quot;lax&quot; validation. Strict validation fails if the outcome is
[validity]=notKnown, whereas lax validation succeeds.

Regards,

<a title="Interview Michael Kay - W3C XML Member and Founder of Saxonica" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/michael_kay.html">Michael Kay</a>
http://www.saxonica.com/
http://twitter.com/michaelhkay 
</pre>
<span id="received"><dfn>Received on</dfn> Saturday,  7 November 2009 10:25:46 GMT</span>
</div>
]]></content></entry><entry><title>Re: Possible to restrict top-level xs:element names? </title><id>http://xsd.stylusstudio.com/2009Nov/post02000.htm</id><link rel="alternate" type="text/html" href="http://xsd.stylusstudio.com/2009Nov/post02000.htm" /><updated>2009-11-06T19:35:27Z</updated><content type="text/plain"><![CDATA[<pre id="body">
<a name="start2" accesskey="j" id="start2"></a>-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

The spec doesn't provide a mechanism by which a <a title="schema" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema.html">schema</a> can constrain
the document element of schema-valid documents.

It _does_ provide license for conformant processors to do
schema-validity assessment with such a constraint in place [1].

Different processors allow users to invoke this kind of processing in
different ways -- what validator are you using?

ht

[1] http://www.<a title="w3" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/w3c/">w3</a>.org/TR/<a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/w3c/schema0/_index.htm">xmlschema-1</a>/#c-res
- -- 
       Henry S. Thompson, School of Informatics, University of Edinburgh
                         Half-time member of W3C Team
      10 Crichton Street, Edinburgh EH8 9AB, SCOTLAND -- (44) 131 650-4440
                Fax: (44) 131 651-1426, e-mail: <a href="mailto:ht&#x40;&#0105;&#0110;&#0102;&#0046;&#0101;&#0100;&#0046;&#0097;&#0099;&#0046;&#0117;&#0107;?Subject=Re%3A%20Possible%20to%20restrict%20top-level%20xs%3Aelement%20names%3F&amp;In-Reply-To=%253Cf5bocnfphts.fsf%40hildegard.inf.ed.ac.uk%253E&amp;References=%253Cf5bocnfphts.fsf%40hildegard.inf.ed.ac.uk%253E">ht&#x40;&#0105;&#0110;&#0102;&#0046;&#0101;&#0100;&#0046;&#0097;&#0099;&#0046;&#0117;&#0107;</a>
                       URL: http://www.ltg.ed.ac.uk/~ht/
[mail really from me _always_ has this .sig -- mail without it is forged spam]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)

iD8DBQFK9Hp/kjnJixAXWBoRAkmzAJ4q7YYJ84l6UmdhZ+gdbrpNdEr9BwCeIxS/
EM49iXoq0GTVWxYb0Vv+bQI=
=muE/
-----END PGP SIGNATURE-----
</pre>
<span id="received"><dfn>Received on</dfn> Friday,  6 November 2009 19:36:17 GMT</span>
</div>
]]></content></entry><entry><title>Re: Possible to restrict top-level xs:element names? </title><id>http://xsd.stylusstudio.com/2009Nov/post03000.htm</id><link rel="alternate" type="text/html" href="http://xsd.stylusstudio.com/2009Nov/post03000.htm" /><updated>2009-11-06T17:35:19Z</updated><content type="text/plain"><![CDATA[<pre id="body">
<a name="start3" accesskey="j" id="start3"></a>On 5 Nov 2009, at 23:58 , kennardconsulting wrote:

&gt;
&gt; I'm generating a bunch of <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">XML</a> Schemas that look roughly like:
&gt;
&gt; &lt;<a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema_editor.html">xs:schema</a> ...&gt;
&gt;   &lt;xs:element name=&quot;foo&quot;/&gt;
&gt;   &lt;xs:element name=&quot;bar&quot;/&gt;
&gt; &lt;/xs:schema&gt;
&gt;
&gt; You can see the actual ones  http://metawidget.org/xsd here . My  
&gt; question
&gt; is, this schema allows me to declare 'foo' and 'bar' in my XML  
&gt; document, but
&gt; doesn't restrict me declaring, say, 'baz'.

I'm not quite sure what you're saying.  Where I come from, it is
natural to speak of declaring 'foo' and 'bar' elements in a <a title="schema
document" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema_editor.html">schema
document</a> (as is done in the skeleton you give), but odd to speak
of 'declaring' elements in the XML instance being validated.

If you mean &quot;how do I prevent someone else writing a schema
document for my target namespace and including a top-level baz
element in it?&quot;, the answer is that you can't prevent other
people from writing what they like in documents on their own
hard disks.  The world is just structured that way.

On the other hand, you don't have <a title="An Introduction to XML Schema Development" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/videos/xmlschema1/xmlschema1.html">to use the schema</a> documents on
their hard disks when you validate.  If you want to ensure that
in a particular validation episode 'foo' and 'bar' will be
global elements in the target namespace, and 'baz' won't be,
you just need to arrange with your <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/open_xsd_validation.html">schema validator</a>, at invocation
time, that it should read your schema documents, and not the
ones on other people's disks that include declaration for
'baz'.  How you arrange with a validator to read certain schema
documents and not read others is out of scope of the schema
language itself; if a particular validator does not allow you
to control things with the degree of precision you need, it's
a quality issue and you should look for a new validator.

If on the other hand you mean &quot;how do I keep someone from
using a 'baz' element in my namespace?&quot;, again, the universe
is so structured that nothing you or XSD or any other schema
language can do could possibly prevent that.

The most you can do is try to arrange that such a usage
counts as invalid when the document is validated against your
schema.  So consider the question &quot;how do I ensure that when
a user uses a 'baz' element in my namespace, it's marked
invalid?&quot; The answer is, roughly:

   (a) tell the validator to read your schema document and
       not some bogus one which defines 'baz' (see above);
   (b) make sure your processor distinguishes between elements
       with [validity]=invalid and those with [validity]=notKnown
       (again, how you do this is between you and your processor,
       and out of scope for the XSD spec); and
   (c) make sure your own code that invokes the validator rejects
       the cases where [validity]=notKnown.


&gt; I was expecting something like...
&gt;
&gt; &lt;xs:schema final=&quot;#all&quot;&gt;
&gt;
&gt; ....so that I could 'close' the set of possible xs:element names. Or  
&gt; maybe
&gt; that the set was closed by default and I'd need...
&gt;
&gt; &lt;xs:schema ...&gt;
&gt;   &lt;xs:element name=&quot;foo&quot;/&gt;
&gt;   &lt;xs:element name=&quot;bar&quot;/&gt;
&gt;   &lt;xs:any /&gt;
&gt; &lt;/xs:schema&gt;
&gt;
&gt; ....to make it open. But instead the set of top-level xs:element names
&gt; appears 'open' by default and I can't find a way to close it? I have  
&gt; looked
&gt; all over the specs and in this <a title="forum" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/SSDN/default.asp">forum</a>, sorry if I'm being dumb.

I'm not sure what you mean by open and closed sets of elements
(or element names) here.  I'm also not sure whether by &quot;top-level&quot;
you mean &quot;can be used as the root element of a document&quot; or
&quot;defined on the top level of a schema document; not local to a
complex type&quot;.  But in a way, I guess, it doesn't really matter:
XSD's design says, essentially, that the way you specify &quot;these
declarations, and no others&quot; is to say just that, but at validation
time, not at schema specification time.

I hope this helps.

-- 
****************************************************************
* C. M. Sperberg-McQueen, Black Mesa Technologies LLC
* http://www.blackmesatech.com
* http://cmsmcq.com/mib
* http://balisage.net
****************************************************************
</pre>
<span id="received"><dfn>Received on</dfn> Saturday,  7 November 2009 00:35:51 GMT</span>
</div>
]]></content></entry><entry><title>Re: Possible to restrict top-level xs:element names? </title><id>http://xsd.stylusstudio.com/2009Nov/post01000.htm</id><link rel="alternate" type="text/html" href="http://xsd.stylusstudio.com/2009Nov/post01000.htm" /><updated>2009-11-06T14:30:11Z</updated><content type="text/plain"><![CDATA[<pre id="body">
<a name="start1" accesskey="j" id="start1"></a>I'm not quite sure what you are asking.  Are you trying to restrict how 
your <a title="schema" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema.html">schema</a> can be extended, or are you trying to restrict what is 
allowed in an instance document?  

Perhaps you have a conceptual misunderstanding?  Note that

&lt;<a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema_editor.html">xs:schema</a> ...&gt;
   &lt;xs:element name=&quot;foo&quot;/&gt;
   &lt;xs:element name=&quot;bar&quot;/&gt;
&lt;/xs:schema&gt;

is not the same as

&lt;xs:schema ...&gt;
   &lt;xs:choice&gt;
      &lt;xs:element name=&quot;foo&quot;/&gt;
      &lt;xs:element name=&quot;bar&quot;/&gt;
   &lt;/xs:choice&gt;
&lt;/xs:schema&gt;

(which isn't legal btw).

That is, the children of your &lt;schema&gt; element do not represent a model 
for your instance documents, which is perhaps how you are thinking of 
it?  Rather, they declare the elements, attributes, and types according 
to which an instance document may be validated.  (Note by the way, that 
there are different approaches <a title="XML Schema Tutorial" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/videos/xmlschema1/xmlschema1.html">to validating documents against schemas</a>, 
see 
http://www.<a title="w3" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/w3c/">w3</a>.org/TR/2004/REC-<a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/w3c/schema0/_index.htm">xmlschema-1</a>-20041028/structures.html#validation_outcome).

I don't believe you can prevent someone from including your <a title="schema 
document" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema_editor.html">schema 
document</a> into theirs while at the same time adding more global elements, 
if that's what you are trying to avoid.

Kevin

-- 
Objective Systems, Inc.
REAL WORLD ASN.1 AND XML SOLUTIONS
Tel: +1 (484) 875-9841
Fax: +1 (484) 875-9830
Toll-free: (877) 307-6855 (USA only)
http://www.obj-sys.com



On 11/6/2009 1:58 AM, kennardconsulting wrote:
&gt; Hi guys,
&gt;
&gt; I'm generating a bunch of XML Schemas that look roughly like:
&gt;
&gt; &lt;xs:schema ...&gt;
&gt;    &lt;xs:element name=&quot;foo&quot;/&gt;
&gt;    &lt;xs:element name=&quot;bar&quot;/&gt;
&gt; &lt;/xs:schema&gt;
&gt;
&gt; You can see the actual ones  http://metawidget.org/xsd here . My question
&gt; is, this schema allows me to declare 'foo' and 'bar' in my XML document, but
&gt; doesn't restrict me declaring, say, 'baz'. I was expecting something like...
&gt;
&gt; &lt;xs:schema final=&quot;#all&quot;&gt;
&gt;
&gt; ....so that I could 'close' the set of possible xs:element names. Or maybe
&gt; that the set was closed by default and I'd need...
&gt;
&gt; &lt;xs:schema ...&gt;
&gt;    &lt;xs:element name=&quot;foo&quot;/&gt;
&gt;    &lt;xs:element name=&quot;bar&quot;/&gt;
&gt;    &lt;xs:any /&gt;
&gt; &lt;/xs:schema&gt;
&gt;
&gt; ....to make it open. But instead the set of top-level xs:element names
&gt; appears 'open' by default and I can't find a way to close it? I have looked
&gt; all over the specs and in this <a title="forum" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/SSDN/default.asp">forum</a>, sorry if I'm being dumb.
&gt;
&gt; Regards,
&gt;
&gt; Richard.
&gt;   
</pre>
<span id="received"><dfn>Received on</dfn> Friday,  6 November 2009 19:32:40 GMT</span>
</div>
]]></content></entry><entry><title>Possible to restrict top-level xs:element names? </title><id>http://xsd.stylusstudio.com/2009Nov/post00000.htm</id><link rel="alternate" type="text/html" href="http://xsd.stylusstudio.com/2009Nov/post00000.htm" /><updated>2009-11-05T22:58:55Z</updated><content type="text/plain"><![CDATA[<pre id="body">
<a name="start0" accesskey="j" id="start0"></a>Hi guys,

I'm generating a bunch of <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">XML</a> Schemas that look roughly like:

&lt;<a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema_editor.html">xs:schema</a> ...&gt;
   &lt;xs:element name=&quot;foo&quot;/&gt;
   &lt;xs:element name=&quot;bar&quot;/&gt;
&lt;/xs:schema&gt;

You can see the actual ones  http://metawidget.org/xsd here . My question
is, this schema allows me to declare 'foo' and 'bar' in my XML document, but
doesn't restrict me declaring, say, 'baz'. I was expecting something like...

&lt;xs:schema final=&quot;#all&quot;&gt;

....so that I could 'close' the set of possible xs:element names. Or maybe
that the set was closed by default and I'd need...

&lt;xs:schema ...&gt;
   &lt;xs:element name=&quot;foo&quot;/&gt;
   &lt;xs:element name=&quot;bar&quot;/&gt;
   &lt;xs:any /&gt;
&lt;/xs:schema&gt;

....to make it open. But instead the set of top-level xs:element names
appears 'open' by default and I can't find a way to close it? I have looked
all over the specs and in this <a title="forum" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/SSDN/default.asp">forum</a>, sorry if I'm being dumb.

Regards,

Richard.
-- 
View this message in context: http://old.nabble.com/Possible-to-restrict-top-level-xs%3Aelement-names--tp26227610p26227610.html
Sent from the <a title="w3" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/w3c/">w3</a>.org - <a title="xmlschema-dev" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://xsd.stylusstudio.com">xmlschema-dev</a> <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/feeds/">mailing list</a> archive at Nabble.com.
</pre>
<span id="received"><dfn>Received on</dfn> Friday,  6 November 2009 18:52:00 GMT</span>
</div>
]]></content></entry><entry><title>[ANN] Altova announces v2010 of the MissionKit tool suite </title><id>http://xsd.stylusstudio.com/2009Oct/post09005.htm</id><link rel="alternate" type="text/html" href="http://xsd.stylusstudio.com/2009Oct/post09005.htm" /><updated>2009-10-29T15:38:25Z</updated><content type="text/plain"><![CDATA[<pre id="body">
<a name="start59" accesskey="j" id="start59"></a>Altova is pleased to announce general availability version 2010 of its
MissionKit XML, database, and UML tools. v2010 is our MOST WANTED
release and includes over 70 new customer-requested features. Just a few
of these include: 

 

* Support <a title="WSDL Tools" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/webservices/wsdl_editor.html">for WSDL 2.0</a>, <a title="JSON vs XML" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.xmlconverters.com/tutorials/json-and-xquery.html">JSON</a>, and SysML technologies

* New <a title="Stylesheet Design" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/videos/publisher1/publisher1.html">stylesheet design</a> paradigm with advanced support for electronic
form design

* Enhanced <a title="XBRL" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://schemas.stylusstudio.com/xbrl/index.html">XBRL</a> <a title="functionality" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/buy/compare.html">functionality</a>

* Database <a title="schema" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema.html">schema</a> comparison

* And much more 

 

More info and <a title="screenshots" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_screenshots.html">screenshots</a> are available at
&lt;http://www.altova.com/whatsnew.html&gt; 

 

Download a fully functional free trial at
&lt;http://www.altova.com/download.html&gt; 

Best regards,

Liz

 

Liz Andrews

Technical Marketing Manager
Altova, Inc.

www.altova.com

 

________________________________

This e-mail and any attachments are intended only for the person/entity
to which they are addressed and may contain confidential and/or
privileged material. If you received this in error, please notify the
sender and delete the message.

 

 

 

Liz Andrews

Technical Marketing Manager
Altova, Inc.

www.altova.com

 

________________________________

This e-mail and any attachments are intended only for the person/entity
to which they are addressed and may contain confidential and/or
privileged material. If you received this in error, please notify the
sender and delete the message.

 
</pre>
<span id="received"><dfn>Received on</dfn> Thursday, 29 October 2009 19:39:06 GMT</span>
</div>
]]></content></entry><entry><title>Re: redefine and target namespace </title><id>http://xsd.stylusstudio.com/2009Oct/post07005.htm</id><link rel="alternate" type="text/html" href="http://xsd.stylusstudio.com/2009Oct/post07005.htm" /><updated>2009-10-26T14:52:05Z</updated><content type="text/plain"><![CDATA[<pre id="body">
<a name="start57" accesskey="j" id="start57"></a>-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Florent Georges writes:

&gt; Henry S. Thompson wrote:
&gt;
&gt;&gt; Without going into tedious and confidential details about
&gt;&gt; personalities and working group <a title="discussions" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/SSDN/default.asp">discussions</a>, suffice it to say
&gt;&gt; that the design we have was the only one that included both
&gt;&gt; possibilities which the WG could reach consensus on.
&gt;
&gt;   Yes, but that does not answer the interesting question: why the
&gt; chosen default value ;-)

That was part of the compromise.

ht
- -- 
       Henry S. Thompson, School of Informatics, University of Edinburgh
                         Half-time member of <a title="W3C" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/w3c/">W3C</a> Team
      10 Crichton Street, Edinburgh EH8 9AB, SCOTLAND -- (44) 131 650-4440
                Fax: (44) 131 651-1426, e-mail: <a href="mailto:ht&#x40;&#0105;&#0110;&#0102;&#0046;&#0101;&#0100;&#0046;&#0097;&#0099;&#0046;&#0117;&#0107;?Subject=Re%3A%20redefine%20and%20target%20namespace&amp;In-Reply-To=%253Cf5bk4yiqkbu.fsf%40hildegard.inf.ed.ac.uk%253E&amp;References=%253Cf5bk4yiqkbu.fsf%40hildegard.inf.ed.ac.uk%253E">ht&#x40;&#0105;&#0110;&#0102;&#0046;&#0101;&#0100;&#0046;&#0097;&#0099;&#0046;&#0117;&#0107;</a>
                       URL: http://www.ltg.ed.ac.uk/~ht/
[mail really from me _always_ has this .sig -- mail without it is forged spam]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)

iD8DBQFK5beVkjnJixAXWBoRAoT5AJ4yFDcwJ5ffeptvNEzg6ORziuap5gCdFrbr
df9/0oDB1kNHtEXZPaHqEks=
=ciuI
-----END PGP SIGNATURE-----
</pre>
<span id="received"><dfn>Received on</dfn> Monday, 26 October 2009 14:54:41 GMT</span>
</div>
]]></content></entry><entry><title>Re: redefine and target namespace </title><id>http://xsd.stylusstudio.com/2009Oct/post06005.htm</id><link rel="alternate" type="text/html" href="http://xsd.stylusstudio.com/2009Oct/post06005.htm" /><updated>2009-10-26T14:20:39Z</updated><content type="text/plain"><![CDATA[<pre id="body">
<a name="start56" accesskey="j" id="start56"></a>Henry S. Thompson wrote:

  Hi,

&gt; Without going into tedious and confidential details about
&gt; personalities and working group <a title="discussions" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/SSDN/default.asp">discussions</a>, suffice it to say
&gt; that the design we have was the only one that included both
&gt; possibilities which the WG could reach consensus on.

  Yes, but that does not answer the interesting question: why the
chosen default value ;-)

  Regards,

-- 
Florent Georges
http://www.fgeorges.org/























      
</pre>
<span id="received"><dfn>Received on</dfn> Monday, 26 October 2009 14:21:16 GMT</span>
</div>
]]></content></entry><entry><title>Re: redefine and target namespace </title><id>http://xsd.stylusstudio.com/2009Oct/post05005.htm</id><link rel="alternate" type="text/html" href="http://xsd.stylusstudio.com/2009Oct/post05005.htm" /><updated>2009-10-26T11:56:14Z</updated><content type="text/plain"><![CDATA[<pre id="body">
<a name="start55" accesskey="j" id="start55"></a>-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

<a title="Interview Michael Kay - W3C XML Member and Founder of Saxonica" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/michael_kay.html">Michael Kay</a> writes:

&gt; Yes. I've never heard an adequate explanation of why this extraordinary
&gt; decision was made, but in practice everyone changes the default by using
&gt; elementFormDefault=&quot;qualified&quot;.

At the time the spec. was written, the community was pretty evenly
divided between people who thought the attribute model (i.e. not in a
namespace as such) was right for leaf node elements as well, and those
who thought that all elements should be qualified.

Without going into tedious and confidential details about
personalities and working group <a title="discussions" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/SSDN/default.asp">discussions</a>, suffice it to say that
the design we have was the only one that included both possibilities
which the WG could reach consensus on.

ht
- -- 
       Henry S. Thompson, School of Informatics, University of Edinburgh
                         Half-time member of W3C Team
      10 Crichton Street, Edinburgh EH8 9AB, SCOTLAND -- (44) 131 650-4440
                Fax: (44) 131 651-1426, e-mail: <a href="mailto:ht&#x40;&#0105;&#0110;&#0102;&#0046;&#0101;&#0100;&#0046;&#0097;&#0099;&#0046;&#0117;&#0107;?Subject=Re%3A%20redefine%20and%20target%20namespace&amp;In-Reply-To=%253Cf5b1vkqs71d.fsf%40hildegard.inf.ed.ac.uk%253E&amp;References=%253Cf5b1vkqs71d.fsf%40hildegard.inf.ed.ac.uk%253E">ht&#x40;&#0105;&#0110;&#0102;&#0046;&#0101;&#0100;&#0046;&#0097;&#0099;&#0046;&#0117;&#0107;</a>
                       URL: http://www.ltg.ed.ac.uk/~ht/
[mail really from me _always_ has this .sig -- mail without it is forged spam]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)

iD8DBQFK5Y5ekjnJixAXWBoRAh2UAJ4gBVgrOq4C+DK22kFTJNRvnLkSFwCfZnsJ
jgNXeNgag92u+CLvC5gXK9o=
=yYHE
-----END PGP SIGNATURE-----
</pre>
<span id="received"><dfn>Received on</dfn> Monday, 26 October 2009 11:57:06 GMT</span>
</div>
]]></content></entry><entry><title>Re: redefine and target namespace </title><id>http://xsd.stylusstudio.com/2009Oct/post08005.htm</id><link rel="alternate" type="text/html" href="http://xsd.stylusstudio.com/2009Oct/post08005.htm" /><updated>2009-10-26T11:22:14Z</updated><content type="text/plain"><![CDATA[<pre id="body">
<a name="start58" accesskey="j" id="start58"></a>Henry Thompson writes:

&gt; That was part of the compromise.

Stated differently:  you can infer that there were a significant number of 
people involved who strongly took the opposite position from yours, and 
the default you see was in deference to their views of what the community 
needed.  As already noted, it was a long and difficult <a title="discussion" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/SSDN/default.asp">discussion</a>, with 
strongly held opinions on both sides.  I don't think anyone thought the 
resulting design was particularly appealing, but given the strongly 
divergent opinions about what users needed and/or about how namespaces 
were supposed to be used, the design had the advantage of letting users 
choose.  FWIW:  I tend to sympathize with George's feeling that most users 
do want the qualified idiom, that qualified would have been a better 
default, etc.  Still, it's way too late to reopen it now, and there are 
schemas out in the wild that use both options as far as I know.

Noah

--------------------------------------
Noah Mendelsohn 
IBM Corporation
One Rogers Street
Cambridge, MA 02142
1-617-693-4036
--------------------------------------








<a href="mailto:ht&#x40;&#0105;&#0110;&#0102;&#0046;&#0101;&#0100;&#0046;&#0097;&#0099;&#0046;&#0117;&#0107;?Subject=Re%3A%20redefine%20and%20target%20namespace&amp;In-Reply-To=%253COFFB5296D8.4C428347-ON8525765B.00540268-8525765B.00546FF1%40lotus.com%253E&amp;References=%253COFFB5296D8.4C428347-ON8525765B.00540268-8525765B.00546FF1%40lotus.com%253E">ht&#x40;&#0105;&#0110;&#0102;&#0046;&#0101;&#0100;&#0046;&#0097;&#0099;&#0046;&#0117;&#0107;</a> (Henry S. Thompson)
Sent by: <a href="mailto:xmlschema-dev-request&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;?Subject=Re%3A%20redefine%20and%20target%20namespace&amp;In-Reply-To=%253COFFB5296D8.4C428347-ON8525765B.00540268-8525765B.00546FF1%40lotus.com%253E&amp;References=%253COFFB5296D8.4C428347-ON8525765B.00540268-8525765B.00546FF1%40lotus.com%253E">xmlschema-dev-request&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;</a>
10/26/2009 10:52 AM
 
        To:     <a href="mailto:lists&#x40;&#0102;&#0103;&#0101;&#0111;&#0114;&#0103;&#0101;&#0115;&#0046;&#0111;&#0114;&#0103;?Subject=Re%3A%20redefine%20and%20target%20namespace&amp;In-Reply-To=%253COFFB5296D8.4C428347-ON8525765B.00540268-8525765B.00546FF1%40lotus.com%253E&amp;References=%253COFFB5296D8.4C428347-ON8525765B.00540268-8525765B.00546FF1%40lotus.com%253E">lists&#x40;&#0102;&#0103;&#0101;&#0111;&#0114;&#0103;&#0101;&#0115;&#0046;&#0111;&#0114;&#0103;</a>
        cc:     <a title="Interview Michael Kay - W3C XML Member and Founder of Saxonica" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/michael_kay.html">Michael Kay</a> &lt;<a href="mailto:mike&#x40;&#0115;&#0097;&#0120;&#0111;&#0110;&#0105;&#0099;&#0097;&#0046;&#0099;&#0111;&#0109;?Subject=Re%3A%20redefine%20and%20target%20namespace&amp;In-Reply-To=%253COFFB5296D8.4C428347-ON8525765B.00540268-8525765B.00546FF1%40lotus.com%253E&amp;References=%253COFFB5296D8.4C428347-ON8525765B.00540268-8525765B.00546FF1%40lotus.com%253E">mike&#x40;&#0115;&#0097;&#0120;&#0111;&#0110;&#0105;&#0099;&#0097;&#0046;&#0099;&#0111;&#0109;</a>&gt;, <a href="mailto:xmlschema-dev&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;?Subject=Re%3A%20redefine%20and%20target%20namespace&amp;In-Reply-To=%253COFFB5296D8.4C428347-ON8525765B.00540268-8525765B.00546FF1%40lotus.com%253E&amp;References=%253COFFB5296D8.4C428347-ON8525765B.00540268-8525765B.00546FF1%40lotus.com%253E">xmlschema-dev&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;</a>, 
(bcc: Noah Mendelsohn/Cambridge/IBM)
        Subject:        Re: redefine and target namespace


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Florent Georges writes:

&gt; Henry S. Thompson wrote:
&gt;
&gt;&gt; Without going into tedious and confidential details about
&gt;&gt; personalities and working group discussions, suffice it to say
&gt;&gt; that the design we have was the only one that included both
&gt;&gt; possibilities which the WG could reach consensus on.
&gt;
&gt;   Yes, but that does not answer the interesting question: why the
&gt; chosen default value ;-)

That was part of the compromise.

ht
- -- 
       Henry S. Thompson, School of Informatics, University of Edinburgh
                         Half-time member of W3C Team
      10 Crichton Street, Edinburgh EH8 9AB, SCOTLAND -- (44) 131 650-4440
                Fax: (44) 131 651-1426, e-mail: <a href="mailto:ht&#x40;&#0105;&#0110;&#0102;&#0046;&#0101;&#0100;&#0046;&#0097;&#0099;&#0046;&#0117;&#0107;?Subject=Re%3A%20redefine%20and%20target%20namespace&amp;In-Reply-To=%253COFFB5296D8.4C428347-ON8525765B.00540268-8525765B.00546FF1%40lotus.com%253E&amp;References=%253COFFB5296D8.4C428347-ON8525765B.00540268-8525765B.00546FF1%40lotus.com%253E">ht&#x40;&#0105;&#0110;&#0102;&#0046;&#0101;&#0100;&#0046;&#0097;&#0099;&#0046;&#0117;&#0107;</a>
                       URL: http://www.ltg.ed.ac.uk/~ht/
[mail really from me _always_ has this .sig -- mail without it is forged 
spam]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)

iD8DBQFK5beVkjnJixAXWBoRAoT5AJ4yFDcwJ5ffeptvNEzg6ORziuap5gCdFrbr
df9/0oDB1kNHtEXZPaHqEks=
=ciuI
-----END PGP SIGNATURE-----
</pre>
<span id="received"><dfn>Received on</dfn> Monday, 26 October 2009 15:23:04 GMT</span>
</div>
]]></content></entry><entry><title>Re: redefine and target namespace </title><id>http://xsd.stylusstudio.com/2009Oct/post04005.htm</id><link rel="alternate" type="text/html" href="http://xsd.stylusstudio.com/2009Oct/post04005.htm" /><updated>2009-10-25T22:39:37Z</updated><content type="text/plain"><![CDATA[<pre id="body">
<a name="start54" accesskey="j" id="start54"></a><a title="Interview Michael Kay - W3C XML Member and Founder of Saxonica" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/michael_kay.html">Michael Kay</a> wrote:

  Hi,

&gt; &gt; I thought the element 'b' was defined in the target
&gt; &gt; namespace, but it seems it has to be in no namespace.

&gt; Just as if you didn't use redefine, your local element
&gt; declaration will only be in the target namespace if you specify
&gt; elementFormDefault=&quot;qualified&quot;

  &lt;blush&gt;Ouch!&lt;/blush&gt;  It's been a long time since I've been
fooled by this one.  I guess I was focused on the redefine...
Sorry for the noise and thanks for the quick answer!

  Regards,

-- 
Florent Georges
http://www.fgeorges.org/






















      
</pre>
<span id="received"><dfn>Received on</dfn> Sunday, 25 October 2009 22:40:11 GMT</span>
</div>
]]></content></entry><entry><title>RE: redefine and target namespace </title><id>http://xsd.stylusstudio.com/2009Oct/post03005.htm</id><link rel="alternate" type="text/html" href="http://xsd.stylusstudio.com/2009Oct/post03005.htm" /><updated>2009-10-25T18:51:17Z</updated><content type="text/plain"><![CDATA[<pre id="body">
<a name="start53" accesskey="j" id="start53"></a>
&gt; I thought the element 'b' was defined in the target namespace, but it
seems it has to be in no namespace.

Just as if you didn't use redefine, your local element declaration will only
be in the target namespace if you specify elementFormDefault=&quot;qualified&quot; on
your <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema_editor.html">xs:schema</a> element. (Or, of course, form=&quot;qualified&quot; on the local
element declaration itself, but no-one ever does that.) 

&gt; Is it really the intent of the spec?

Yes. I've never heard an adequate explanation of why this extraordinary
decision was made, but in practice everyone changes the default by using
elementFormDefault=&quot;qualified&quot;.

Regards,

<a title="Interview Michael Kay - W3C XML Member and Founder of Saxonica" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/michael_kay.html">Michael Kay</a>
http://www.saxonica.com/
http://twitter.com/michaelhkay 

 
</pre>
<span id="received"><dfn>Received on</dfn> Sunday, 25 October 2009 18:51:50 GMT</span>
</div>
]]></content></entry><entry><title>redefine and target namespace </title><id>http://xsd.stylusstudio.com/2009Oct/post02005.htm</id><link rel="alternate" type="text/html" href="http://xsd.stylusstudio.com/2009Oct/post02005.htm" /><updated>2009-10-25T18:05:41Z</updated><content type="text/plain"><![CDATA[<pre id="body">
<a name="start52" accesskey="j" id="start52"></a>  Hi,

  I have a <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema_editor.html">schema document</a> that redefines a complex type as
following:

    &lt;xs:redefine schemaLocation=&quot;redefine.xsd&quot;&gt;
       &lt;<a title="xs:complexType" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema_editor.html">xs:complexType</a> name=&quot;root&quot;&gt;
          &lt;xs:complexContent&gt;
             &lt;xs:extension base=&quot;tns:root&quot;&gt;
                &lt;xs:sequence&gt;
                   &lt;xs:element name=&quot;b&quot; type=&quot;xs:string&quot;/&gt;
                &lt;/xs:sequence&gt;
             &lt;/xs:extension&gt;
          &lt;/xs:complexContent&gt;
       &lt;/xs:complexType&gt;
    &lt;/xs:redefine&gt;

  I thought the element 'b' was defined in the target namespace,
but it seems it has to be in no namespace.  Is it really the
intent of the spec?  Did I do anything wrong?  I <a title="xerces Tutorial" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml/xerces.html">use Xerces 2 for
Java</a> (as in Java SE 6.)

  redefine.xsd:

    &lt;?xml version=&quot;1.0&quot; <a title="encoding" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_other.html">encoding</a>=&quot;UTF-8&quot;?&gt;

    &lt;xs:schema xmlns:xs=&quot;http://www.<a title="w3" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/w3c/">w3</a>.org/2001/XMLSchema&quot;
               xmlns:tns=&quot;tns&quot;
               targetNamespace=&quot;tns&quot;
               elementFormDefault=&quot;qualified&quot;&gt;

       &lt;xs:element name=&quot;root&quot; type=&quot;tns:root&quot;/&gt;

       &lt;xs:complexType name=&quot;root&quot;&gt;
          &lt;xs:sequence&gt;
             &lt;xs:element name=&quot;a&quot; type=&quot;xs:string&quot;/&gt;
          &lt;/xs:sequence&gt;
       &lt;/xs:complexType&gt;

    &lt;/xs:schema&gt;

  redefine-red.xsd:

    &lt;xs:schema xmlns:xs=&quot;http://www.w3.org/2001/XMLSchema&quot;
               targetNamespace=&quot;tns&quot;
               xmlns:tns=&quot;tns&quot;&gt;

       &lt;xs:redefine schemaLocation=&quot;redefine.xsd&quot;&gt;
          &lt;xs:complexType name=&quot;root&quot;&gt;
             &lt;xs:complexContent&gt;
                &lt;xs:extension base=&quot;tns:root&quot;&gt;
                   &lt;xs:sequence&gt;
                      &lt;xs:element name=&quot;b&quot; type=&quot;xs:string&quot;/&gt;
                   &lt;/xs:sequence&gt;
                &lt;/xs:extension&gt;
             &lt;/xs:complexContent&gt;
          &lt;/xs:complexType&gt;
       &lt;/xs:redefine&gt;

       &lt;xs:element name=&quot;redefined&quot; type=&quot;tns:root&quot;/&gt;

    &lt;/xs:schema&gt;

  Valid redefine.xml:

    &lt;tns:redefined xmlns:tns=&quot;tns&quot;&gt;
       &lt;tns:a&gt;bla&lt;/tns:a&gt;
       &lt;b&gt;bla&lt;/b&gt;
    &lt;/tns:redefined&gt;

  Expected valid redefine.xml (but actually invalid):

    &lt;redefined xmlns=&quot;tns&quot;&gt;
       &lt;a&gt;bla&lt;/a&gt;
       &lt;b&gt;bla&lt;/b&gt;
    &lt;/redefined&gt;

  Regards,

-- 
Florent Georges
http://www.fgeorges.org/






















      
</pre>
<span id="received"><dfn>Received on</dfn> Sunday, 25 October 2009 18:06:15 GMT</span>
</div>
]]></content></entry><entry><title>Re: Resolution of &amp;quot;ref&amp;quot; attribute in case of &amp;lt;override&amp;gt; </title><id>http://xsd.stylusstudio.com/2009Oct/post01005.htm</id><link rel="alternate" type="text/html" href="http://xsd.stylusstudio.com/2009Oct/post01005.htm" /><updated>2009-10-22T10:18:39Z</updated><content type="text/plain"><![CDATA[<pre id="body">
<a name="start51" accesskey="j" id="start51"></a>Very well.  Thank you, Michael and Michael.

On 10/22/2009 4:08 AM, <a title="Interview Michael Kay - W3C XML Member and Founder of Saxonica" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/michael_kay.html">Michael Kay</a> wrote:
&gt;&gt; How will the prefix in the ref attribute in the 
&gt;&gt; attributeGroup element be handled?  If D2' is the result of 
&gt;&gt; applying the xs:override transform, and D2' contains an 
&gt;&gt; element information item that is identical to the one for the 
&gt;&gt; &lt;attributeGroup&gt;, I expect it will have [in-scope namespaces] 
&gt;&gt; based on what we see above; namely, the qrs prefix will 
&gt;&gt; necessarily resolve to &quot;uri:example.com&quot;.  Is that correct?
&gt;&gt;     
&gt;
&gt; Yes. In fact, this doesn't even depend on the <a title="Stylesheet Design" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/videos/publisher1/publisher1.html">stylesheet</a> being <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/schema_aware.html">schema-aware</a>
&gt; and on &#64;ref being known to be a QName. The element is copied using
&gt; &lt;<a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xslt.html">xsl</a>:copy-of&gt;, which copies all the in-scope namespaces of an element,
&gt; including therefore the namespace <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/jaxb.html">binding</a> for &quot;qrs&quot;.
&gt;   
&gt;&gt; Also, a second question.  I don't speak XSLT, but the 
&gt;&gt; stylesheet given for the transformation for xs:override 
&gt;&gt; includes a comment that says :
&gt;&gt;
&gt;&gt;   &lt;!--* change xs:override elements:  children which match 
&gt;&gt;       * children of $overrideElement are replaced, others are
&gt;&gt;       * kept, and at the end all children of $overrideElement
&gt;&gt;       * not already inserted are added.
&gt;&gt;       *--&gt;
&gt;&gt;
&gt;&gt; The &quot;at the end all children...&quot; clause doesn't appear to be 
&gt;&gt; consistent with the description that precedes the stylesheet. 
&gt;&gt;  Specifically, I don't see where a child of O1 that does not 
&gt;&gt; correspond to a child of D2 
&gt;&gt; would be put into D2'.   Perhaps I misunderstand the comment, 
&gt;&gt; or perhaps 
&gt;&gt; it isn't consistent with the XSLT that is there (again, I 
&gt;&gt; don't speak XSLT).  Is there an inconsistency here?
&gt;&gt;     
&gt;
&gt; I think Michael Sperberg McQueen has explained this part. It is complex and
&gt; my brain aches a little every time I look at it, but I think I have
&gt; convinced myself that it works. It would benefit, however, from some serious
&gt; testing: there is an assumption that we will produce tests before exiting
&gt; CR.
&gt;
&gt; Regards,
&gt;
&gt; Michael Kay
&gt; http://www.saxonica.com/
&gt; http://twitter.com/michaelhkay 
&gt;
&gt;
&gt;
&gt;   
</pre>
<span id="received"><dfn>Received on</dfn> Thursday, 22 October 2009 14:20:56 GMT</span>
</div>
]]></content></entry><entry><title>RE: Resolution of &amp;quot;ref&amp;quot; attribute in case of &amp;lt;override&amp;gt; </title><id>http://xsd.stylusstudio.com/2009Oct/post00005.htm</id><link rel="alternate" type="text/html" href="http://xsd.stylusstudio.com/2009Oct/post00005.htm" /><updated>2009-10-22T09:08:12Z</updated><content type="text/plain"><![CDATA[<pre id="body">
<a name="start50" accesskey="j" id="start50"></a>&gt; 
&gt; How will the prefix in the ref attribute in the 
&gt; attributeGroup element be handled?  If D2' is the result of 
&gt; applying the xs:override transform, and D2' contains an 
&gt; element information item that is identical to the one for the 
&gt; &lt;attributeGroup&gt;, I expect it will have [in-scope namespaces] 
&gt; based on what we see above; namely, the qrs prefix will 
&gt; necessarily resolve to &quot;uri:example.com&quot;.  Is that correct?

Yes. In fact, this doesn't even depend on the <a title="Stylesheet Design" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/videos/publisher1/publisher1.html">stylesheet</a> being <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/schema_aware.html">schema-aware</a>
and on &#64;ref being known to be a QName. The element is copied using
&lt;<a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xslt.html">xsl</a>:copy-of&gt;, which copies all the in-scope namespaces of an element,
including therefore the namespace <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/jaxb.html">binding</a> for &quot;qrs&quot;.
&gt; 
&gt; Also, a second question.  I don't speak XSLT, but the 
&gt; stylesheet given for the transformation for xs:override 
&gt; includes a comment that says :
&gt; 
&gt;   &lt;!--* change xs:override elements:  children which match 
&gt;       * children of $overrideElement are replaced, others are
&gt;       * kept, and at the end all children of $overrideElement
&gt;       * not already inserted are added.
&gt;       *--&gt;
&gt; 
&gt; The &quot;at the end all children...&quot; clause doesn't appear to be 
&gt; consistent with the description that precedes the stylesheet. 
&gt;  Specifically, I don't see where a child of O1 that does not 
&gt; correspond to a child of D2 
&gt; would be put into D2'.   Perhaps I misunderstand the comment, 
&gt; or perhaps 
&gt; it isn't consistent with the XSLT that is there (again, I 
&gt; don't speak XSLT).  Is there an inconsistency here?

I think Michael Sperberg McQueen has explained this part. It is complex and
my brain aches a little every time I look at it, but I think I have
convinced myself that it works. It would benefit, however, from some serious
testing: there is an assumption that we will produce tests before exiting
CR.

Regards,

<a title="Interview Michael Kay - W3C XML Member and Founder of Saxonica" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/michael_kay.html">Michael Kay</a>
http://www.saxonica.com/
http://twitter.com/michaelhkay 
</pre>
<span id="received"><dfn>Received on</dfn> Thursday, 22 October 2009 08:08:58 GMT</span>
</div>
]]></content></entry><entry><title>Re: Resolution of &amp;quot;ref&amp;quot; attribute in case of &amp;lt;override&amp;gt; </title><id>http://xsd.stylusstudio.com/2009Oct/post09004.htm</id><link rel="alternate" type="text/html" href="http://xsd.stylusstudio.com/2009Oct/post09004.htm" /><updated>2009-10-21T18:11:48Z</updated><content type="text/plain"><![CDATA[<pre id="body">
<a name="start49" accesskey="j" id="start49"></a>On 21 Oct 2009, at 15:22 , Kevin Braun wrote:

 &gt; Here's an <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema.html">XSD</a> 1.1 &lt;override&gt; question.

 &gt; Suppose I have:

 &gt; &lt;schema ...  xmlns:qrs=&quot;uri:example.com&quot;&gt;
 &gt; &lt;override ...&gt;
 &gt;   &lt;complexType name=&quot;SomeType&quot;&gt;
 &gt;     &lt;attributeGroup ref=&quot;qrs:abc&quot;/&gt;
 &gt;   &lt;/complexType&gt;
 &gt; &lt;/override&gt;
 &gt; ...
 &gt; &lt;/schema&gt;

 &gt; How will the prefix in the ref attribute in the attributeGroup
 &gt; element be handled?

 &gt; If D2' is the result of applying the xs:override transform, and D2'
 &gt; contains an element information item that is identical to the one
 &gt; for the &lt;attributeGroup&gt;, I expect it will have [in-scope
 &gt; namespaces] based on what we see above; namely, the qrs prefix will
 &gt; necessarily resolve to &quot;uri:example.com&quot;.  Is that correct?

That's certainly the intent.  The namespace fixup rules of <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xslt.html">XSLT</a> are
complicated enough that I don't want to say more about how it works
in detailuntil I have a chance to work the example through in more
detail.  But at a high level, the <a title="Stylesheet Design" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/videos/publisher1/publisher1.html">stylesheet</a> knows the type of
attributeGroup/@ref, so it knows there are QNames around which may
depend on the current namespace <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/jaxb.html">bindings</a>.  And when the node is
re-serialized in its new context, it should not have lost any
namespace bindings.  (The prefix may change, of course, but not the
expanded name denoted by qrs:abc.)

 &gt; Also, a second question.  I don't speak XSLT, but the stylesheet
 &gt; given for the transformation for xs:override includes a comment
 &gt; that says :

 &gt; &lt;!--* change xs:override elements:  children which match
 &gt;     * children of $overrideElement are replaced, others are
 &gt;     * kept, and at the end all children of $overrideElement
 &gt;     * not already inserted are added.
 &gt;     *--&gt;

 &gt; The &quot;at the end all children...&quot; clause doesn't appear to be
 &gt; consistent with the description that precedes the stylesheet.
 &gt; Specifically, I don't see where a child of O1 that does not
 &gt; correspond to a child of D2 would be put into D2'.  Perhaps I
 &gt; misunderstand the comment, or perhaps it isn't consistent with the
 &gt; XSLT that is there (again, I don't speak XSLT).  Is there an
 &gt; inconsistency here?

The comment correctly describes the template which follows it, I
think.  And it also matches the behavior described in rule 4 of the
prose description.

The template applies to xs:override elements within D2, so we are
dealing with two override elements: O1, which is the override we are
trying to handle by performing the transformation, and E2 (the
override child of D2), which is in the process of being transformed
into a new override element O2, which will appear within D2'.

O2 contains (1) children corresponding to the children of E2.  If a
particular child of E2 matches some child of O1, then what O2
contains is the child of O1 (the child of E2 has been overridden by
the child of O1).  If a particular child of E2 matches no child of
O1, then O2 has that child unchanged.

O2 also contains (2) children corresponding to the children of O1.
If a child of O1 matches a child of E2, it's present in O2 as already
described above.  If a child of O1 matches no child of E2, it's
copied into O2 without change.

Example:

<a title="Schema document" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema_editor.html">Schema document</a> D1 overrides schema document D2, and its override
element contains declarations for elements A, B, and C.

   &lt;schema xmlns=&quot;http://www.w3.org/2001/XMLSchema&quot;&gt;
     &lt;override id=&quot;d1o&quot; schemaLocation=&quot;D2.xsd&quot;&gt;
       &lt;element name=&quot;A&quot; type=&quot;anyURI&quot;/&gt;
       &lt;element name=&quot;B&quot; type=&quot;boolean&quot;/&gt;
       &lt;element name=&quot;C&quot; type=&quot;decimal&quot;/&gt;
     &lt;/override&gt;
   &lt;/schema&gt;

Schema document D2 overrides schema document D3, and the override
element contains declarations for elements C and D.

   &lt;schema xmlns=&quot;http://www.w3.org/2001/XMLSchema&quot;&gt;
     &lt;override id=&quot;d2o&quot; schemaLocation=&quot;D3.xsd&quot;&gt;
       &lt;element name=&quot;C&quot; type=&quot;double&quot;/&gt;
       &lt;element name=&quot;D&quot; type=&quot;duration&quot;/&gt;
     &lt;/override&gt;
   &lt;/schema&gt;

Schema document D3 declares elements A, B, C, D, and E.

   &lt;schema xmlns=&quot;http://www.w3.org/2001/XMLSchema&quot;&gt;
     &lt;element name=&quot;A&quot; /&gt;
     &lt;element name=&quot;B&quot; /&gt;
     &lt;element name=&quot;C&quot; /&gt;
     &lt;element name=&quot;D&quot; /&gt;
     &lt;element name=&quot;E&quot; /&gt;
   &lt;/schema&gt;

Observe first that the end result needs to have A, B, C, and D
declared as anyURI, boolean, decimal, and duration, respectively.

The first draft of override said, essentially, &quot;That's too
complicated, it's not going to happen&quot;, and override only affected
elements declared in D2.  The result here would have been that of all
the overrides in D1, only the override of C would have had any
effect.  (At least, that's my recollection; I have not gone back to
review the details of the original proposal.)

The WG was troubled by the inconvenience this represented, and wanted
the overrides in D1 to affect not only declarations in D2 but
declarations in documents referenced by D2.  We spent some time
working out how to make this happen; the mechanism in the stylesheet
is the result.

The effect of the override of D2 in D1 is, according to the spec, the
same as an include of the transformed schema document D2', which
would look something like this:

   &lt;schema xmlns=&quot;http://www.w3.org/2001/XMLSchema&quot;&gt;
     &lt;override id=&quot;d2o&quot; schemaLocation=&quot;D3.xsd&quot;&gt;
       &lt;element name=&quot;C&quot; type=&quot;decimal&quot;/&gt;
       &lt;element name=&quot;D&quot; type=&quot;duration&quot;/&gt;
       &lt;element name=&quot;A&quot; type=&quot;anyURI&quot;/&gt;
       &lt;element name=&quot;B&quot; type=&quot;boolean&quot;/&gt;
     &lt;/override&gt;
   &lt;/schema&gt;

Note that the overrides for A and B are included here, even though
they matched nothing in override d2o.  They are needed to ensure
that A and B are overridden WHEREVER they were declared.

The meaning of the override in D2' is, again, the same as the meaning
of an include on a transformed target D3', reading:

   &lt;schema xmlns=&quot;http://www.w3.org/2001/XMLSchema&quot;&gt;
     &lt;element name=&quot;A&quot; type=&quot;anyURI&quot;/&gt;
     &lt;element name=&quot;B&quot; type=&quot;boolean&quot;/&gt;
     &lt;element name=&quot;C&quot; type=&quot;decimal&quot;/&gt;
     &lt;element name=&quot;D&quot; type=&quot;duration&quot;/&gt;
     &lt;element name=&quot;E&quot; /&gt;
   &lt;/schema&gt;

If we rewrite the overriding schema documents as well, to show the
change from override to include, we end up with an imaginare D1'
reading

   &lt;schema xmlns=&quot;http://www.w3.org/2001/XMLSchema&quot;&gt;
     &lt;include id=&quot;d1o&quot; schemaLocation=&quot;D2''.xsd&quot;/&gt;
   &lt;/schema&gt;

And a D2'' reading

   &lt;schema xmlns=&quot;http://www.w3.org/2001/XMLSchema&quot;&gt;
     &lt;include id=&quot;d2o&quot; schemaLocation=&quot;D3'.xsd&quot;/&gt;
   &lt;/schema&gt;

If the unmatched overrides of d1o had NOT been copied into the
modified version of d2o, then the final result would have had
a D3' of the form

   &lt;schema xmlns=&quot;http://www.w3.org/2001/XMLSchema&quot;&gt;
     &lt;element name=&quot;A&quot;/&gt;
     &lt;element name=&quot;B&quot;/&gt;
     &lt;element name=&quot;C&quot; type=&quot;decimal&quot;/&gt;
     &lt;element name=&quot;D&quot; type=&quot;duration&quot;/&gt;
     &lt;element name=&quot;E&quot; /&gt;
   &lt;/schema&gt;

By copying even the unmatched children of O1 into O2, we ensure that
the declarations of O1 will override other declarations of the same
component name, no matter where those other declarations occur in the
target set of O1.  The transformation of include elements into
overide elements serves the same purpose.

I hope this helps.


-- 
****************************************************************
* C. M. Sperberg-McQueen, Black Mesa Technologies LLC
* http://www.blackmesatech.com
* http://cmsmcq.com/mib
* http://balisage.net
****************************************************************
</pre>
<span id="received"><dfn>Received on</dfn> Thursday, 22 October 2009 00:12:20 GMT</span>
</div>
]]></content></entry><entry><title>Resolution of &amp;quot;ref&amp;quot; attribute in case of &amp;lt;override&amp;gt; </title><id>http://xsd.stylusstudio.com/2009Oct/post08004.htm</id><link rel="alternate" type="text/html" href="http://xsd.stylusstudio.com/2009Oct/post08004.htm" /><updated>2009-10-21T17:22:02Z</updated><content type="text/plain"><![CDATA[<pre id="body">
<a name="start48" accesskey="j" id="start48"></a>Hi,

Here's an <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema.html">XSD</a> 1.1 &lt;override&gt; question.

Suppose I have:

&lt;schema ...  xmlns:qrs=&quot;uri:example.com&quot;&gt;
  &lt;override ...&gt;
    &lt;complexType name=&quot;SomeType&quot;&gt;
      &lt;attributeGroup ref=&quot;qrs:abc&quot;/&gt;
    &lt;/complexType&gt;
  &lt;/override&gt;
  ...
&lt;/schema&gt;   

How will the prefix in the ref attribute in the attributeGroup element 
be handled?  If D2' is the result of applying the xs:override transform, 
and D2' contains an element information item that is identical to the 
one for the &lt;attributeGroup&gt;, I expect it will have [in-scope 
namespaces] based on what we see above; namely, the qrs prefix will 
necessarily resolve to &quot;uri:example.com&quot;.  Is that correct?

Also, a second question.  I don't speak <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xslt.html">XSLT</a>, but the <a title="Stylesheet Design" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/videos/publisher1/publisher1.html">stylesheet</a> given 
for the transformation for xs:override includes a comment that says :

  &lt;!--* change xs:override elements:  children which match 
      * children of $overrideElement are replaced, others are
      * kept, and at the end all children of $overrideElement
      * not already inserted are added.
      *--&gt;

The &quot;at the end all children...&quot; clause doesn't appear to be consistent 
with the description that precedes the stylesheet.  Specifically, I 
don't see where a child of O1 that does not correspond to a child of D2 
would be put into D2'.   Perhaps I misunderstand the comment, or perhaps 
it isn't consistent with the XSLT that is there (again, I don't speak 
XSLT).  Is there an inconsistency here?

Regards,
Keviin

-- 
Objective Systems, Inc.
REAL WORLD ASN.1 AND <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">XML</a> SOLUTIONS
Tel: +1 (484) 875-9841
Fax: +1 (484) 875-9830
Toll-free: (877) 307-6855 (USA only)
http://www.obj-sys.com
</pre>
<span id="received"><dfn>Received on</dfn> Wednesday, 21 October 2009 21:24:11 GMT</span>
</div>
]]></content></entry><entry><title>Re: Tools to Generate XSD </title><id>http://xsd.stylusstudio.com/2009Oct/post07004.htm</id><link rel="alternate" type="text/html" href="http://xsd.stylusstudio.com/2009Oct/post07004.htm" /><updated>2009-10-20T22:33:32Z</updated><content type="text/plain"><![CDATA[<pre id="body">
<a name="start47" accesskey="j" id="start47"></a>Hi Scott,

Trang can <a title="Schema Tutorial" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/videos/xmlschema1/xmlschema1.html">generate XML Schema</a> from a set of <a title="XML files" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_file_explorer.html">XML files</a>
http://code.google.com/p/jing-trang/

Best Regards,
George
-- 
George Cristian Bina
&lt;oXygen/&gt; <a title="Best XML Editor" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/">XML Editor</a>, Schema <a title="Building XSLT Stylesheet Applications" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/videos/xsltedit1/xsltedit1.html">Editor and XSLT</a> Editor/Debugger
http://www.oxygenxml.com

Tsao, Scott wrote:
&gt; I am wondering if there are good <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml/editor/">tools</a> that would enable (auto) 
&gt; generation of XML schema from multiple instances of <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/learn_xml.html">sample XML</a> document.
&gt;  
&gt; It seems to me that one should be able to specify certain parameters for 
&gt; the resulting schema, e.g., the design pattern [1] to be followed.
&gt;  
&gt; Any comments or suggestions?
&gt;  
&gt; [1] 
&gt; http://developers.sun.com/jsenterprise/archive/nb_enterprise_pack/reference/techart/design_patterns.html
&gt;  
&gt;  
&gt; Thanks,
&gt; 
&gt; /Scott Tsao/ $BAbThT"(B
&gt; Associate Technical Fellow
&gt; The Boeing Company
&gt; 
</pre>
<span id="received"><dfn>Received on</dfn> Tuesday, 20 October 2009 19:34:05 GMT</span>
</div>
]]></content></entry><entry><title>Set up </title><id>http://xsd.stylusstudio.com/2009Oct/post06004.htm</id><link rel="alternate" type="text/html" href="http://xsd.stylusstudio.com/2009Oct/post06004.htm" /><updated>2009-10-20T10:51:47Z</updated><content type="text/plain"><![CDATA[<pre id="body">
<a name="start46" accesskey="j" id="start46"></a>Hello.

I downloaded <a title="XSV Validator" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema/xsv.html">the XSV validator</a> and am a novice user I think because from the hours I have spent looking for set up instructions, I cannot find them.  Can you provide the steps I need to follow to set up my validator?

Janell Craig
Business Analyst
Oakland Schools&lt;http://oakland.k12.mi.us&gt; Technology Services&lt;http://www.oakland.k12.mi.us/Departments/TechnologyServices/tabid/932/Default.aspx&gt;
2111 Pontiac Lake Rd.
Waterford, MI  48328

(Ofc)  248-209-2020
(Fax)  248-209-2207
</pre>
<span id="received"><dfn>Received on</dfn> Tuesday, 20 October 2009 17:14:09 GMT</span>
</div>
]]></content></entry><entry><title>RE: Tools to Generate XSD </title><id>http://xsd.stylusstudio.com/2009Oct/post05004.htm</id><link rel="alternate" type="text/html" href="http://xsd.stylusstudio.com/2009Oct/post05004.htm" /><updated>2009-10-20T09:26:40Z</updated><content type="text/plain"><![CDATA[<pre id="body">
<a name="start45" accesskey="j" id="start45"></a>I've had good results on this using <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/">Stylus Studio</a>. It works from a single
instance document, but you can always combine multiple instances into one
before you start. There is some control over the design patterns it uses,
but I generally find the default settings are quite usable. Of course you
have to <a title="tidy" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_well_formed.html">tidy</a> up the <a title="How To Build XML Schemas" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/videos/xmlschema1/xmlschema1.html">generated schema</a> by hand afterwards, for example to make
intelligent decisions about when to use enumerations and patterns in your
simple types, or when to impose a hierarchy of types or substitution groups,
but I find it's often a good way of creating a first cut.
 
Regards,

<a title="Interview Michael Kay - W3C XML Member and Founder of Saxonica" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/michael_kay.html">Michael Kay</a>
http://www.saxonica.com/
http://twitter.com/michaelhkay 


  _____  

From: <a href="mailto:xmlschema-dev-request&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;?Subject=RE%3A%20Tools%20to%20Generate%20XSD%20from%20Sample%20Instances%1B(B&amp;In-Reply-To=%253CC09F6F3D84954D37B37F434C49D1FF0B%40Sealion%253E&amp;References=%253CC09F6F3D84954D37B37F434C49D1FF0B%40Sealion%253E">xmlschema-dev-request&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;</a> [mailto:<a href="mailto:xmlschema-dev-request&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;?Subject=RE%3A%20Tools%20to%20Generate%20XSD%20from%20Sample%20Instances%1B(B&amp;In-Reply-To=%253CC09F6F3D84954D37B37F434C49D1FF0B%40Sealion%253E&amp;References=%253CC09F6F3D84954D37B37F434C49D1FF0B%40Sealion%253E">xmlschema-dev-request&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;</a>] On
Behalf Of Tsao, Scott
Sent: 20 October 2009 02:06
To: <a href="mailto:xmlschema-dev&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;?Subject=RE%3A%20Tools%20to%20Generate%20XSD%20from%20Sample%20Instances%1B(B&amp;In-Reply-To=%253CC09F6F3D84954D37B37F434C49D1FF0B%40Sealion%253E&amp;References=%253CC09F6F3D84954D37B37F434C49D1FF0B%40Sealion%253E">xmlschema-dev&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;</a>
Subject: <a title="Tools" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml/editor/">Tools</a> to Generate XSD from Sample Instances


I am wondering if there are good tools that would enable (auto) generation
of XML schema from multiple instances of sample XML document.
 
It seems to me that one should be able to specify certain parameters for the
resulting schema, e.g., the design pattern [1] to be followed.
 
Any comments or suggestions?
 
[1]
http://developers.sun.com/jsenterprise/archive/nb_enterprise_pack/reference/
techart/design_patterns.html
 
 
Thanks,



Scott Tsao $BAbThT"(B
Associate Technical Fellow 
The Boeing Company 
</pre>
<span id="received"><dfn>Received on</dfn> Tuesday, 20 October 2009 08:27:15 GMT</span>
</div>
]]></content></entry><entry><title>Re: Tools to Generate XSD </title><id>http://xsd.stylusstudio.com/2009Oct/post04004.htm</id><link rel="alternate" type="text/html" href="http://xsd.stylusstudio.com/2009Oct/post04004.htm" /><updated>2009-10-20T09:07:09Z</updated><content type="text/plain"><![CDATA[<pre id="body">
<a name="start44" accesskey="j" id="start44"></a>My good advice: don't.

or at least, do not expect too much of it.
If you do, you will still need to do a lot of manual <a title="XML Schema Tutorial" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/videos/xmlschema1/xmlschema1.html">work afterwoods improving your schema</a>.

For example, if some attributes are enumerated, how do you know that ? And if you do, how are you sure you have all possible values in your schema ?
How do you know whether the minOccurs for a child element should be 0 or 1 ?

Essentially, automated generation can only be a very first step.

I have seen cases where a believe that XML-Schemas can be generated automatically, without any afterwork, has led to disaster.
For example, the <a title="Convert EDI to XML" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/convert_edi_to_xml.html">HL7</a>-v3 messages are auto-generated from UML diagrams. At least as far as I know, they are not improved after that by someone who has knowledge of  XML-Schema. The result is that the whole stuff is overcomplicated, illogical and even bad XML.
I can advice anyone that wishes to <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_generator.html">generate XML</a>-Schemas to first learn XML-Schema.

Personally, I prefer to make a good model first (not using UML) and then write the XML-Schema by hand.

Best,

Jozef Aerts
XML4Pharma

  ----- Original Message ----- 
  From: Tsao, Scott 
    To: <a href="mailto:xmlschema-dev&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;?Subject=Re%3A%20Tools%20to%20Generate%20XSD%20from%20Sample%20Instances%1B(B&amp;In-Reply-To=%253C9C5CDCA91CDA4E018BDC58A29A5E3B46%40D6NXTQ1J%253E&amp;References=%253C9C5CDCA91CDA4E018BDC58A29A5E3B46%40D6NXTQ1J%253E">xmlschema-dev&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;</a> 
    Sent: Tuesday, October 20, 2009 3:06 AM
    Subject: <a title="Tools" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml/editor/">Tools</a> to Generate XSD from Sample Instances


    I am wondering if there are good tools that would enable (auto) generation of XML schema from multiple instances of sample XML document.
     
    It seems to me that one should be able to specify certain parameters for the resulting schema, e.g., the design pattern [1] to be followed.
     
    Any comments or suggestions?
     
    [1] http://developers.sun.com/jsenterprise/archive/nb_enterprise_pack/reference/techart/design_patterns.html
     
     
    Thanks,


    Scott Tsao $BAbThT"(B
    Associate Technical Fellow 
    The Boeing Company 
</pre>
<span id="received"><dfn>Received on</dfn> Tuesday, 20 October 2009 07:07:48 GMT</span>
</div>
]]></content></entry><entry><title>Tools to Generate XSD </title><id>http://xsd.stylusstudio.com/2009Oct/post03004.htm</id><link rel="alternate" type="text/html" href="http://xsd.stylusstudio.com/2009Oct/post03004.htm" /><updated>2009-10-19T18:06:26Z</updated><content type="text/plain"><![CDATA[<pre id="body">
<a name="start43" accesskey="j" id="start43"></a>I am wondering if there are good <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml/editor/">tools</a> that would enable (auto) <a title="generation of XML" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_generator.html">generation of XML</a> <a title="schema" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema.html">schema</a> from multiple instances of <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/learn_xml.html">sample XML</a> document.

It seems to me that one should be able to specify certain parameters for the resulting schema, e.g., the design pattern [1] to be followed.

Any comments or suggestions?

[1] http://developers.sun.com/jsenterprise/archive/nb_enterprise_pack/reference/techart/design_patterns.html


Thanks,


Scott Tsao $BAbThT"(B
Associate Technical Fellow
The Boeing Company
</pre>
<span id="received"><dfn>Received on</dfn> Tuesday, 20 October 2009 01:07:01 GMT</span>
</div>
]]></content></entry><entry><title>Re: XML schema </title><id>http://xsd.stylusstudio.com/2009Oct/post01004.htm</id><link rel="alternate" type="text/html" href="http://xsd.stylusstudio.com/2009Oct/post01004.htm" /><updated>2009-10-19T17:22:12Z</updated><content type="text/plain"><![CDATA[<pre id="body">
<a name="start41" accesskey="j" id="start41"></a>Hi, Michael

Would it be something like this?
&lt;<a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema_editor.html">xs:attribute</a> name=&quot;attribute_id&quot; use=&quot;required&quot;&gt;
   &lt;xs:simpleType&gt;
       &lt;xs:restriction base=&quot;xs:string&quot;&gt;
           &lt;xs:assert test=&quot;&#64;attribute_id=Attributes/Attribute/@id or
&#64;attribute_id='id'&quot;&gt;       &lt;/xs:restriction&gt;
   &lt;/xs:simpleType&gt;
&lt;/xs:attribute&gt;

We are using saxon8 to parse and eclipse and altova <a title="xml" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml.html">xml</a> spy to edit xml.
Are they support 1.1?

Is 1.1 backward compatible with 1.0? I mean: is it enough to change the
header of the xml and <a title="xsd" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema.html">xsd</a> or the whole xsd and xml should have been changed?

Is this the correct header for xsd?
&lt;?xml version=&quot;1.1&quot; <a title="encoding" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_other.html">encoding</a>=&quot;UTF-8&quot;?&gt;
&lt;xs:schema xmlns:xs=&quot;http://www.<a title="w3" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/w3c/">w3</a>.org/2001/XMLSchema&quot;
elementFormDefault=&quot;qualified&quot; attributeFormDefault=&quot;unqualified&quot;&gt;

Because both eclipse and xml spy says that it is not valid.

Thanks for help.

Regards:
   Bence



On Mon, Oct 19, 2009 at 12:27 AM, <a title="Interview Michael Kay - W3C XML Member and Founder of Saxonica" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/michael_kay.html">Michael Kay</a> &lt;<a href="mailto:mike&#x40;&#0115;&#0097;&#0120;&#0111;&#0110;&#0105;&#0099;&#0097;&#0046;&#0099;&#0111;&#0109;?Subject=Re%3A%20XML%20schema&amp;In-Reply-To=%253Cb1a070230910190822g25711efcudd2ecc7899efc6b5%40mail.gmail.com%253E&amp;References=%253Cb1a070230910190822g25711efcudd2ecc7899efc6b5%40mail.gmail.com%253E">mike&#x40;&#0115;&#0097;&#0120;&#0111;&#0110;&#0105;&#0099;&#0097;&#0046;&#0099;&#0111;&#0109;</a>&gt; wrote:

&gt; I don't think this can be done in XSD 1.0
&gt;
&gt; It can be done in XSD 1.1, of course, using assertions.
&gt;
&gt; Regards,
&gt;
&gt; Michael Kay
&gt; http://www.saxonica.com/
&gt; http://twitter.com/michaelhkay
&gt;
&gt; &gt; -----Original Message-----
&gt; &gt; From: <a href="mailto:xmlschema-dev-request&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;?Subject=Re%3A%20XML%20schema&amp;In-Reply-To=%253Cb1a070230910190822g25711efcudd2ecc7899efc6b5%40mail.gmail.com%253E&amp;References=%253Cb1a070230910190822g25711efcudd2ecc7899efc6b5%40mail.gmail.com%253E">xmlschema-dev-request&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;</a>
&gt; &gt; [mailto:<a href="mailto:xmlschema-dev-request&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;?Subject=Re%3A%20XML%20schema&amp;In-Reply-To=%253Cb1a070230910190822g25711efcudd2ecc7899efc6b5%40mail.gmail.com%253E&amp;References=%253Cb1a070230910190822g25711efcudd2ecc7899efc6b5%40mail.gmail.com%253E">xmlschema-dev-request&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;</a>] On Behalf Of btakacs
&gt; &gt; Sent: 18 October 2009 11:32
&gt; &gt; To: <a href="mailto:xmlschema-dev&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;?Subject=Re%3A%20XML%20schema&amp;In-Reply-To=%253Cb1a070230910190822g25711efcudd2ecc7899efc6b5%40mail.gmail.com%253E&amp;References=%253Cb1a070230910190822g25711efcudd2ecc7899efc6b5%40mail.gmail.com%253E">xmlschema-dev&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;</a>
&gt; &gt; Subject: XML schema
&gt; &gt;
&gt; &gt; Hi
&gt; &gt;
&gt; &gt; I have an xml schema which restricts the
&gt; &gt; Indexes/Tag/@attribute_id values to the ones are defined in
&gt; &gt; the parent element's Attributes/Attribute/@id. Is there a way
&gt; &gt; to extend this and enable one (or more) different static
&gt; &gt; values for example &quot;id&quot;?
&gt; &gt; There are more Indexes/Tag and Attributes/Attribute tags and
&gt; &gt; i would like to use this restriction only for thoose that has
&gt; &gt; the same parent.
&gt; &gt;
&gt; &gt; Here is my current configuration:
&gt; &gt;
&gt; &gt; ....
&gt; &gt; &lt;xs:element name=&quot;Attributes&quot;&gt;
&gt; &gt;   &lt;xs:complexType&gt;
&gt; &gt;     &lt;xs:sequence&gt;
&gt; &gt;       &lt;xs:element name=&quot;Attribute&quot; maxOccurs=&quot;unbounded&quot;&gt;
&gt; &gt;       &lt;xs:complexType&gt;
&gt; &gt;         &lt;xs:complexContent&gt;
&gt; &gt;           &lt;xs:extension base=&quot;Attribute_Type&quot;&gt;
&gt; &gt;             &lt;xs:attribute name=&quot;typedef_id&quot; type=&quot;xs:string&quot;
&gt; &gt; use=&quot;required&quot;/&gt;
&gt; &gt;              &lt;/xs:extension&gt;
&gt; &gt;         &lt;/xs:complexContent&gt;
&gt; &gt;       &lt;/xs:complexType&gt;
&gt; &gt;       &lt;/xs:element&gt;
&gt; &gt;     &lt;/xs:sequence&gt;
&gt; &gt;   &lt;/xs:complexType&gt;
&gt; &gt; &lt;/xs:element&gt;
&gt; &gt; ....
&gt; &gt; &lt;xs:element name=&quot;Indexes&quot; minOccurs=&quot;0&quot;&gt;
&gt; &gt;   &lt;xs:complexType&gt;
&gt; &gt;     &lt;xs:sequence&gt;
&gt; &gt;       &lt;xs:element name=&quot;Tag&quot; maxOccurs=&quot;unbounded&quot;&gt;
&gt; &gt;       &lt;xs:complexType&gt;
&gt; &gt;           &lt;xs:attribute name=&quot;attribute_id&quot; use=&quot;required&quot;&gt;
&gt; &gt;               &lt;xs:simpleType&gt;
&gt; &gt;                 &lt;xs:restriction base=&quot;xs:string&quot;&gt;
&gt; &gt;                   &lt;xs:pattern value=&quot;[a-z0-9]([a-z0-9.]|(_[a-z]))*&quot;/&gt;
&gt; &gt;                      &lt;/xs:restriction&gt;
&gt; &gt;                   &lt;/xs:simpleType&gt;
&gt; &gt;                 &lt;/xs:attribute&gt;
&gt; &gt;              &lt;/xs:complexType&gt;
&gt; &gt;            &lt;/xs:element&gt;
&gt; &gt;         &lt;/xs:sequence&gt;
&gt; &gt;    &lt;/xs:complexType&gt;
&gt; &gt; &lt;/xs:element&gt;
&gt; &gt; ....
&gt; &gt; ....
&gt; &gt; &lt;xs:key name=&quot;ATTRIBUTE&quot;&gt;
&gt; &gt;     &lt;xs:selector xpath=&quot;Attributes/Attribute&quot;/&gt;
&gt; &gt;     &lt;xs:field xpath=&quot;&#64;id&quot;/&gt;
&gt; &gt; &lt;/xs:key&gt;
&gt; &gt; &lt;xs:keyref name=&quot;X001&quot; refer=&quot;ATTRIBUTE&quot;&gt;
&gt; &gt;    &lt;xs:selector xpath=&quot;Indexes/Tag&quot;/&gt;
&gt; &gt;    &lt;xs:field xpath=&quot;&#64;attribute_id&quot;/&gt;
&gt; &gt; &lt;/xs:keyref&gt;
&gt; &gt; ....
&gt; &gt;
&gt; &gt;
&gt; &gt; Thanks:
&gt; &gt;    Bence
&gt; &gt; --
&gt; &gt; View this message in context:
&gt; &gt; http://www.nabble.com/XML-schema-tp25945562p25945562.html
&gt; &gt; Sent from the w3.org - xmlschema-dev mailing list archive at
&gt; &gt; Nabble.com.
&gt; &gt;
&gt; &gt;
&gt; &gt;
&gt;
&gt;
</pre>
<span id="received"><dfn>Received on</dfn> Monday, 19 October 2009 15:22:47 GMT</span>
</div>
]]></content></entry><entry><title>RE: XML schema </title><id>http://xsd.stylusstudio.com/2009Oct/post02004.htm</id><link rel="alternate" type="text/html" href="http://xsd.stylusstudio.com/2009Oct/post02004.htm" /><updated>2009-10-19T16:57:10Z</updated><content type="text/plain"><![CDATA[<pre id="body">
<a name="start42" accesskey="j" id="start42"></a>This looks correct (from visual inspection).
 
To run it you will need <a title="Saxon" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/saxon_xquery_processor.html">Saxon</a> 9.2 or <a title="Evaluating XPath with Xerces" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml/xerces.html">the development version of Xerces</a> (I
can't speak for Xerces). Most <a title="XML Schema" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema.html">schema tools</a> do not yet support XSD 1.1, and
both these two are incomplete implementations.
 
You don't need to change the <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema_editor.html">xs:schema</a> element in order <a title="Schema Tutorial" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/videos/xmlschema1/xmlschema1.html">to use XSD 1.1</a>. All
you need to do is to use an XSD 1.1 processor.
 
Regards,

<a title="Interview Michael Kay - W3C XML Member and Founder of Saxonica" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/michael_kay.html">Michael Kay</a>
http://www.saxonica.com/
http://twitter.com/michaelhkay 


  _____  

From: <a href="mailto:xmlschema-dev-request&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;?Subject=RE%3A%20XML%20schema&amp;In-Reply-To=%253CA0FE946685264B139BB4E86CC320BD5C%40Sealion%253E&amp;References=%253CA0FE946685264B139BB4E86CC320BD5C%40Sealion%253E">xmlschema-dev-request&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;</a> [mailto:<a href="mailto:xmlschema-dev-request&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;?Subject=RE%3A%20XML%20schema&amp;In-Reply-To=%253CA0FE946685264B139BB4E86CC320BD5C%40Sealion%253E&amp;References=%253CA0FE946685264B139BB4E86CC320BD5C%40Sealion%253E">xmlschema-dev-request&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;</a>] On
Behalf Of Bence Takács
Sent: 19 October 2009 16:22
To: <a href="mailto:xmlschema-dev&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;?Subject=RE%3A%20XML%20schema&amp;In-Reply-To=%253CA0FE946685264B139BB4E86CC320BD5C%40Sealion%253E&amp;References=%253CA0FE946685264B139BB4E86CC320BD5C%40Sealion%253E">xmlschema-dev&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;</a>
Subject: Re: XML schema


Hi, Michael

Would it be something like this?
&lt;xs:attribute name=&quot;attribute_id&quot; use=&quot;required&quot;&gt;
   &lt;xs:simpleType&gt;
       &lt;xs:restriction base=&quot;xs:string&quot;&gt;                   

           &lt;xs:assert test=&quot;&#64;attribute_id=Attributes/Attribute/@id or
&#64;attribute_id='id'&quot;&gt; 
       &lt;/xs:restriction&gt;
   &lt;/xs:simpleType&gt;
&lt;/xs:attribute&gt;

We are using saxon8 to parse and eclipse and altova xml spy to edit xml.
Are they support 1.1?

Is 1.1 backward compatible with 1.0? I mean: is it enough to change the
header of the xml and xsd or the whole xsd and xml should have been changed?

Is this the correct header for xsd?
&lt;?xml version=&quot;1.1&quot; <a title="encoding" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_other.html">encoding</a>=&quot;UTF-8&quot;?&gt;
&lt;xs:schema xmlns:xs=&quot;http://www.w3.org/2001/XMLSchema&quot;
elementFormDefault=&quot;qualified&quot; attributeFormDefault=&quot; 
unqualified&quot;&gt;

Because both eclipse and xml spy says that it is not valid.

Thanks for help.

Regards:
   Bence




On Mon, Oct 19, 2009 at 12:27 AM, Michael Kay &lt;<a href="mailto:mike&#x40;&#0115;&#0097;&#0120;&#0111;&#0110;&#0105;&#0099;&#0097;&#0046;&#0099;&#0111;&#0109;?Subject=RE%3A%20XML%20schema&amp;In-Reply-To=%253CA0FE946685264B139BB4E86CC320BD5C%40Sealion%253E&amp;References=%253CA0FE946685264B139BB4E86CC320BD5C%40Sealion%253E">mike&#x40;&#0115;&#0097;&#0120;&#0111;&#0110;&#0105;&#0099;&#0097;&#0046;&#0099;&#0111;&#0109;</a>&gt; wrote:


I don't think this can be done in XSD 1.0

It can be done in XSD 1.1, of course, using assertions.

Regards,

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


&gt; -----Original Message-----
&gt; From: <a href="mailto:xmlschema-dev-request&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;?Subject=RE%3A%20XML%20schema&amp;In-Reply-To=%253CA0FE946685264B139BB4E86CC320BD5C%40Sealion%253E&amp;References=%253CA0FE946685264B139BB4E86CC320BD5C%40Sealion%253E">xmlschema-dev-request&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;</a>
&gt; [mailto:<a href="mailto:xmlschema-dev-request&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;?Subject=RE%3A%20XML%20schema&amp;In-Reply-To=%253CA0FE946685264B139BB4E86CC320BD5C%40Sealion%253E&amp;References=%253CA0FE946685264B139BB4E86CC320BD5C%40Sealion%253E">xmlschema-dev-request&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;</a>] On Behalf Of btakacs
&gt; Sent: 18 October 2009 11:32
&gt; To: <a href="mailto:xmlschema-dev&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;?Subject=RE%3A%20XML%20schema&amp;In-Reply-To=%253CA0FE946685264B139BB4E86CC320BD5C%40Sealion%253E&amp;References=%253CA0FE946685264B139BB4E86CC320BD5C%40Sealion%253E">xmlschema-dev&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;</a>
&gt; Subject: XML schema
&gt;
&gt; Hi
&gt;
&gt; I have an xml schema which restricts the
&gt; Indexes/Tag/@attribute_id values to the ones are defined in
&gt; the parent element's Attributes/Attribute/@id. Is there a way
&gt; to extend this and enable one (or more) different static
&gt; values for example &quot;id&quot;?
&gt; There are more Indexes/Tag and Attributes/Attribute tags and
&gt; i would like to use this restriction only for thoose that has
&gt; the same parent.
&gt;
&gt; Here is my current configuration:
&gt;
&gt; ....
&gt; &lt;xs:element name=&quot;Attributes&quot;&gt;
&gt;   &lt;xs:complexType&gt;
&gt;     &lt;xs:sequence&gt;
&gt;       &lt;xs:element name=&quot;Attribute&quot; maxOccurs=&quot;unbounded&quot;&gt;
&gt;       &lt;xs:complexType&gt;
&gt;         &lt;xs:complexContent&gt;
&gt;           &lt;xs:extension base=&quot;Attribute_Type&quot;&gt;
&gt;             &lt;xs:attribute name=&quot;typedef_id&quot; type=&quot;xs:string&quot;
&gt; use=&quot;required&quot;/&gt;
&gt;              &lt;/xs:extension&gt;
&gt;         &lt;/xs:complexContent&gt;
&gt;       &lt;/xs:complexType&gt;
&gt;       &lt;/xs:element&gt;
&gt;     &lt;/xs:sequence&gt;
&gt;   &lt;/xs:complexType&gt;
&gt; &lt;/xs:element&gt;
&gt; ....
&gt; &lt;xs:element name=&quot;Indexes&quot; minOccurs=&quot;0&quot;&gt;
&gt;   &lt;xs:complexType&gt;
&gt;     &lt;xs:sequence&gt;
&gt;       &lt;xs:element name=&quot;Tag&quot; maxOccurs=&quot;unbounded&quot;&gt;
&gt;       &lt;xs:complexType&gt;
&gt;           &lt;xs:attribute name=&quot;attribute_id&quot; use=&quot;required&quot;&gt;
&gt;               &lt;xs:simpleType&gt;
&gt;                 &lt;xs:restriction base=&quot;xs:string&quot;&gt;
&gt;                   &lt;xs:pattern value=&quot;[a-z0-9]([a-z0-9.]|(_[a-z]))*&quot;/&gt;
&gt;                      &lt;/xs:restriction&gt;
&gt;                   &lt;/xs:simpleType&gt;
&gt;                 &lt;/xs:attribute&gt;
&gt;              &lt;/xs:complexType&gt;
&gt;            &lt;/xs:element&gt;
&gt;         &lt;/xs:sequence&gt;
&gt;    &lt;/xs:complexType&gt;
&gt; &lt;/xs:element&gt;
&gt; ....
&gt; ....
&gt; &lt;xs:key name=&quot;ATTRIBUTE&quot;&gt;
&gt;     &lt;xs:selector xpath=&quot;Attributes/Attribute&quot;/&gt;
&gt;     &lt;xs:field xpath=&quot;&#64;id&quot;/&gt;
&gt; &lt;/xs:key&gt;
&gt; &lt;xs:keyref name=&quot;X001&quot; refer=&quot;ATTRIBUTE&quot;&gt;
&gt;    &lt;xs:selector xpath=&quot;Indexes/Tag&quot;/&gt;
&gt;    &lt;xs:field xpath=&quot;&#64;attribute_id&quot;/&gt;
&gt; &lt;/xs:keyref&gt;
&gt; ....
&gt;
&gt;
&gt; Thanks:
&gt;    Bence
&gt; --
&gt; View this message in context:
&gt; http://www.nabble.com/XML-schema-tp25945562p25945562.html
&gt; Sent from the w3.org - xmlschema-dev mailing list archive at
&gt; Nabble.com.
&gt;
&gt;
&gt;
</pre>
<span id="received"><dfn>Received on</dfn> Monday, 19 October 2009 16:01:54 GMT</span>
</div>
]]></content></entry><entry><title>Re: Escalation mechanism for different interpretation of W3C XML-Schema specification ? </title><id>http://xsd.stylusstudio.com/2009Oct/post00004.htm</id><link rel="alternate" type="text/html" href="http://xsd.stylusstudio.com/2009Oct/post00004.htm" /><updated>2009-10-19T11:06:23Z</updated><content type="text/plain"><![CDATA[<pre id="body">
<a name="start40" accesskey="j" id="start40"></a>-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

<a title="Interview Michael Kay - W3C XML Member and Founder of Saxonica" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/michael_kay.html">Michael Kay</a> writes:

&gt;&gt; ...  I think this probably means that I would have to augment my 
&gt;&gt; list of <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema_editor.html">schema document</a> abstraction to actually make it a 
&gt;&gt; list of (<a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema_doc_gen.html">schemadoc</a>, targetNamespace) pairs, 
&gt;
&gt; That's precisely what I do in my implementation.

And what <a title="XSV XML Schema" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema/xsv.html">XSV</a> does -- it is necessary to do this to ensure multiple
chameleon includes into different namespaces works properly.

ht
- -- 
       Henry S. Thompson, School of Informatics, University of Edinburgh
                         Half-time member of W3C Team
      10 Crichton Street, Edinburgh EH8 9AB, SCOTLAND -- (44) 131 650-4440
                Fax: (44) 131 651-1426, e-mail: <a href="mailto:ht&#x40;&#0105;&#0110;&#0102;&#0046;&#0101;&#0100;&#0046;&#0097;&#0099;&#0046;&#0117;&#0107;?Subject=Re%3A%20Escalation%20mechanism%20for%20different%20interpretation%20of%20W3C%20XML-Schema%20specification%20%3F&amp;In-Reply-To=%253Cf5baaznem00.fsf%40hildegard.inf.ed.ac.uk%253E&amp;References=%253Cf5baaznem00.fsf%40hildegard.inf.ed.ac.uk%253E">ht&#x40;&#0105;&#0110;&#0102;&#0046;&#0101;&#0100;&#0046;&#0097;&#0099;&#0046;&#0117;&#0107;</a>
                       URL: http://www.ltg.ed.ac.uk/~ht/
[mail really from me _always_ has this .sig -- mail without it is forged spam]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)

iD8DBQFK3DofkjnJixAXWBoRAmnlAJ9I6XnNvI5W6qSgTPvVOqzLg84aWgCfbYYy
lXbIHxYFMPnudei1X12a7IQ=
=F8lC
-----END PGP SIGNATURE-----
</pre>
<span id="received"><dfn>Received on</dfn> Monday, 19 October 2009 10:06:58 GMT</span>
</div>
]]></content></entry><entry><title>Re: Escalation mechanism for different interpretation of W3C XML-Schema specification ? </title><id>http://xsd.stylusstudio.com/2009Oct/post09003.htm</id><link rel="alternate" type="text/html" href="http://xsd.stylusstudio.com/2009Oct/post09003.htm" /><updated>2009-10-19T11:02:27Z</updated><content type="text/plain"><![CDATA[<pre id="body">
<a name="start39" accesskey="j" id="start39"></a>-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

<a title="Interview Michael Kay - W3C XML Member and Founder of Saxonica" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/michael_kay.html">Michael Kay</a> writes:

&gt; Note that dcterms-elem.<a title="xsd" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema.html">xsd</a> is reachable from vac.xsd via one route that
&gt; contain a &quot;redefines&quot; step, and by another route that omits this step (but
&gt; which does contain a different redefines step). This is where the
&gt; interpretation of &quot;pervasiveness&quot; is critical: <a title="Saxon" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/saxon_xquery_processor.html">Saxon</a> takes the view that all
&gt; references to components that have been redefined are references to the
&gt; post-redefinition component. In fact the rule introduced in Saxon 9.2 (whose
&gt; incorrect implementation caused the bug) is that every component has a
&gt; redefinition level, so if A redefines B and B redefines C then a given
&gt; component may have redefinition levels of 2, 1, and 0; all references to a
&gt; component name are taken as references to the highest available redefinition
&gt; level, and if there are two different components at the highest redefinition
&gt; level, it's an error (for example, A redefines C, and B also redefines C).
&gt; There's nothing at all in the spec to justify these rules, but it's the only
&gt; way I could find of handling complex redefinition lattices that seemed to
&gt; make sense.

I agree that this is the best available interpretation.

&gt; But the chameleon includes interfere with this (perhaps deliberately).
&gt; Because the common components have been copied into three different
&gt; namespaces, a redefine occurring in one namespace does not affect copies of
&gt; the component in a different namespace. That's Saxon's interpretation,
&gt; anyway.

I agree again.

&gt; In experimenting further with this schema, I discovered that if the two
&gt; imports from vac.xsd are reversed in order, the import of
&gt; owms-classes-redef.xsd has no effect, because it is then importing a
&gt; namespace that is already known to the processor; Saxon ignores the
&gt; schemaLocation URI in this case. So the <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema_editor.html">schema document</a>
&gt; owms-classes-redef.xsd, and the redefinitions that it contains, are simply
&gt; ignored. This makes the situation very fragile: reversing the order of
&gt; imports does not make the processing fail, it just silently compiles a
&gt; different schema. I think this reinforces Henry's argument that if you're
&gt; going to redefine, then there should be one redefining document for each
&gt; namespace, which acts as a gateway to that namespace, and no other
&gt; includes/imports/redefines from elsewhere in the schema should bypass this
&gt; gateway. This schema breaks this rule, and gets away with it only because of
&gt; gateway document is encountered before the bypassing document.

Right -- a useful analysis, thanks.

ht
- -- 
       Henry S. Thompson, School of Informatics, University of Edinburgh
                         Half-time member of W3C Team
      10 Crichton Street, Edinburgh EH8 9AB, SCOTLAND -- (44) 131 650-4440
                Fax: (44) 131 651-1426, e-mail: <a href="mailto:ht&#x40;&#0105;&#0110;&#0102;&#0046;&#0101;&#0100;&#0046;&#0097;&#0099;&#0046;&#0117;&#0107;?Subject=Re%3A%20Escalation%20mechanism%20for%20different%20interpretation%20of%20W3C%20XML-Schema%20specification%20%3F&amp;In-Reply-To=%253Cf5beiozem6k.fsf%40hildegard.inf.ed.ac.uk%253E&amp;References=%253Cf5beiozem6k.fsf%40hildegard.inf.ed.ac.uk%253E">ht&#x40;&#0105;&#0110;&#0102;&#0046;&#0101;&#0100;&#0046;&#0097;&#0099;&#0046;&#0117;&#0107;</a>
                       URL: http://www.ltg.ed.ac.uk/~ht/
[mail really from me _always_ has this .sig -- mail without it is forged spam]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)

iD8DBQFK3DkzkjnJixAXWBoRAj1IAJ9CVgigXB3xQfzTe9x2OeTovT3E6QCfQNmG
VvXucWnVMMi+LG/RifrT8c4=
=xFVQ
-----END PGP SIGNATURE-----
</pre>
<span id="received"><dfn>Received on</dfn> Monday, 19 October 2009 10:02:59 GMT</span>
</div>
]]></content></entry><entry><title>RE: XML schema </title><id>http://xsd.stylusstudio.com/2009Oct/post08003.htm</id><link rel="alternate" type="text/html" href="http://xsd.stylusstudio.com/2009Oct/post08003.htm" /><updated>2009-10-18T23:27:50Z</updated><content type="text/plain"><![CDATA[<pre id="body">
<a name="start38" accesskey="j" id="start38"></a>I don't think this can be done in <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema.html">XSD</a> 1.0

It can be done in XSD 1.1, of course, using assertions.

Regards,

<a title="Interview Michael Kay - W3C XML Member and Founder of Saxonica" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/michael_kay.html">Michael Kay</a>
http://www.saxonica.com/
http://twitter.com/michaelhkay  

&gt; -----Original Message-----
&gt; From: <a href="mailto:xmlschema-dev-request&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;?Subject=RE%3A%20XML%20schema&amp;In-Reply-To=%253C5A333B3E4183445A9555462FAD43A535%40Sealion%253E&amp;References=%253C5A333B3E4183445A9555462FAD43A535%40Sealion%253E">xmlschema-dev-request&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;</a> 
&gt; [mailto:<a href="mailto:xmlschema-dev-request&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;?Subject=RE%3A%20XML%20schema&amp;In-Reply-To=%253C5A333B3E4183445A9555462FAD43A535%40Sealion%253E&amp;References=%253C5A333B3E4183445A9555462FAD43A535%40Sealion%253E">xmlschema-dev-request&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;</a>] On Behalf Of btakacs
&gt; Sent: 18 October 2009 11:32
&gt; To: <a href="mailto:xmlschema-dev&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;?Subject=RE%3A%20XML%20schema&amp;In-Reply-To=%253C5A333B3E4183445A9555462FAD43A535%40Sealion%253E&amp;References=%253C5A333B3E4183445A9555462FAD43A535%40Sealion%253E">xmlschema-dev&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;</a>
&gt; Subject: XML schema
&gt; 
&gt; Hi
&gt; 
&gt; I have an xml schema which restricts the 
&gt; Indexes/Tag/@attribute_id values to the ones are defined in 
&gt; the parent element's Attributes/Attribute/@id. Is there a way 
&gt; to extend this and enable one (or more) different static 
&gt; values for example &quot;id&quot;?
&gt; There are more Indexes/Tag and Attributes/Attribute tags and 
&gt; i would like to use this restriction only for thoose that has 
&gt; the same parent.
&gt; 
&gt; Here is my current configuration:
&gt; 
&gt; ....
&gt; &lt;<a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema_editor.html">xs:element</a> name=&quot;Attributes&quot;&gt;
&gt;   &lt;xs:complexType&gt;
&gt;     &lt;xs:sequence&gt;
&gt;       &lt;xs:element name=&quot;Attribute&quot; maxOccurs=&quot;unbounded&quot;&gt;
&gt; 	&lt;xs:complexType&gt;
&gt; 	  &lt;xs:complexContent&gt;
&gt; 	    &lt;xs:extension base=&quot;Attribute_Type&quot;&gt;
&gt; 	      &lt;xs:attribute name=&quot;typedef_id&quot; type=&quot;xs:string&quot; 
&gt; use=&quot;required&quot;/&gt;
&gt;              &lt;/xs:extension&gt;
&gt; 	  &lt;/xs:complexContent&gt;
&gt; 	&lt;/xs:complexType&gt;
&gt;       &lt;/xs:element&gt;
&gt;     &lt;/xs:sequence&gt;
&gt;   &lt;/xs:complexType&gt;
&gt; &lt;/xs:element&gt;
&gt; ....
&gt; &lt;xs:element name=&quot;Indexes&quot; minOccurs=&quot;0&quot;&gt;
&gt;   &lt;xs:complexType&gt;
&gt;     &lt;xs:sequence&gt;
&gt;       &lt;xs:element name=&quot;Tag&quot; maxOccurs=&quot;unbounded&quot;&gt;
&gt; 	&lt;xs:complexType&gt;
&gt;           &lt;xs:attribute name=&quot;attribute_id&quot; use=&quot;required&quot;&gt;
&gt; 		&lt;xs:simpleType&gt;
&gt; 		  &lt;xs:restriction base=&quot;xs:string&quot;&gt;
&gt; 		    &lt;xs:pattern value=&quot;[a-z0-9]([a-z0-9.]|(_[a-z]))*&quot;/&gt;
&gt; 		       &lt;/xs:restriction&gt;
&gt; 		    &lt;/xs:simpleType&gt;
&gt; 		  &lt;/xs:attribute&gt;
&gt; 	       &lt;/xs:complexType&gt;
&gt; 	     &lt;/xs:element&gt;
&gt; 	  &lt;/xs:sequence&gt;
&gt;    &lt;/xs:complexType&gt;
&gt; &lt;/xs:element&gt;
&gt; ....
&gt; ....
&gt; &lt;xs:key name=&quot;ATTRIBUTE&quot;&gt;
&gt;     &lt;xs:selector <a title="XPath Basics" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xpath.html">xpath</a>=&quot;Attributes/Attribute&quot;/&gt;
&gt;     &lt;xs:field xpath=&quot;&#64;id&quot;/&gt;
&gt; &lt;/xs:key&gt;
&gt; &lt;xs:keyref name=&quot;X001&quot; refer=&quot;ATTRIBUTE&quot;&gt;
&gt;    &lt;xs:selector xpath=&quot;Indexes/Tag&quot;/&gt;
&gt;    &lt;xs:field xpath=&quot;&#64;attribute_id&quot;/&gt;
&gt; &lt;/xs:keyref&gt;
&gt; ....
&gt; 
&gt; 
&gt; Thanks:
&gt;    Bence
&gt; --
&gt; View this message in context: 
&gt; http://www.nabble.com/XML-schema-tp25945562p25945562.html
&gt; Sent from the w3.org - xmlschema-dev mailing list archive at 
&gt; Nabble.com.
&gt; 
&gt; 
&gt; 
</pre>
<span id="received"><dfn>Received on</dfn> Sunday, 18 October 2009 22:28:24 GMT</span>
</div>
]]></content></entry><entry><title>XML schema </title><id>http://xsd.stylusstudio.com/2009Oct/post07003.htm</id><link rel="alternate" type="text/html" href="http://xsd.stylusstudio.com/2009Oct/post07003.htm" /><updated>2009-10-18T03:31:44Z</updated><content type="text/plain"><![CDATA[<pre id="body">
<a name="start37" accesskey="j" id="start37"></a>Hi

I have an <a title="xml schema" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema.html">xml schema</a> which restricts the Indexes/Tag/@attribute_id values to
the ones are defined in the parent element's Attributes/Attribute/@id. Is
there a way to extend this and enable one (or more) different static values
for example &quot;id&quot;?
There are more Indexes/Tag and Attributes/Attribute tags and i would like to
use this restriction only for thoose that has the same parent.

Here is my current configuration:

....
&lt;<a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema_editor.html">xs:element</a> name=&quot;Attributes&quot;&gt;
  &lt;xs:complexType&gt;
    &lt;xs:sequence&gt;
      &lt;xs:element name=&quot;Attribute&quot; maxOccurs=&quot;unbounded&quot;&gt;
	&lt;xs:complexType&gt;
	  &lt;xs:complexContent&gt;
	    &lt;xs:extension base=&quot;Attribute_Type&quot;&gt;
	      &lt;xs:attribute name=&quot;typedef_id&quot; type=&quot;xs:string&quot; use=&quot;required&quot;/&gt;
             &lt;/xs:extension&gt;
	  &lt;/xs:complexContent&gt;
	&lt;/xs:complexType&gt;
      &lt;/xs:element&gt;
    &lt;/xs:sequence&gt;
  &lt;/xs:complexType&gt;
&lt;/xs:element&gt;
....
&lt;xs:element name=&quot;Indexes&quot; minOccurs=&quot;0&quot;&gt;
  &lt;xs:complexType&gt;
    &lt;xs:sequence&gt;
      &lt;xs:element name=&quot;Tag&quot; maxOccurs=&quot;unbounded&quot;&gt;
	&lt;xs:complexType&gt;
          &lt;xs:attribute name=&quot;attribute_id&quot; use=&quot;required&quot;&gt;
		&lt;xs:simpleType&gt;
		  &lt;xs:restriction base=&quot;xs:string&quot;&gt;
		    &lt;xs:pattern value=&quot;[a-z0-9]([a-z0-9.]|(_[a-z]))*&quot;/&gt;
		       &lt;/xs:restriction&gt;
		    &lt;/xs:simpleType&gt;
		  &lt;/xs:attribute&gt;
	       &lt;/xs:complexType&gt;
	     &lt;/xs:element&gt;
	  &lt;/xs:sequence&gt;
   &lt;/xs:complexType&gt;
&lt;/xs:element&gt;
....
....
&lt;xs:key name=&quot;ATTRIBUTE&quot;&gt;
    &lt;xs:selector <a title="XPath Basics" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xpath.html">xpath</a>=&quot;Attributes/Attribute&quot;/&gt;
    &lt;xs:field xpath=&quot;&#64;id&quot;/&gt;
&lt;/xs:key&gt;
&lt;xs:keyref name=&quot;X001&quot; refer=&quot;ATTRIBUTE&quot;&gt;
   &lt;xs:selector xpath=&quot;Indexes/Tag&quot;/&gt;
   &lt;xs:field xpath=&quot;&#64;attribute_id&quot;/&gt;
&lt;/xs:keyref&gt;
....


Thanks:
   Bence
-- 
View this message in context: http://www.nabble.com/XML-schema-tp25945562p25945562.html
Sent from the <a title="w3" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/w3c/">w3</a>.org - <a title="xmlschema-dev" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://xsd.stylusstudio.com">xmlschema-dev</a> <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/feeds/">mailing list</a> archive at Nabble.com.
</pre>
<span id="received"><dfn>Received on</dfn> Sunday, 18 October 2009 21:30:47 GMT</span>
</div>
]]></content></entry><entry><title>RE: Escalation mechanism for different interpretation of W3C XML-Schema specification ? </title><id>http://xsd.stylusstudio.com/2009Oct/post05003.htm</id><link rel="alternate" type="text/html" href="http://xsd.stylusstudio.com/2009Oct/post05003.htm" /><updated>2009-10-16T22:22:09Z</updated><content type="text/plain"><![CDATA[<pre id="body">
<a name="start35" accesskey="j" id="start35"></a> 

&gt; -----Original Message-----
&gt; From: <a href="mailto:noah_mendelsohn&#x40;&#0117;&#0115;&#0046;&#0105;&#0098;&#0109;&#0046;&#0099;&#0111;&#0109;?Subject=RE%3A%20Escalation%20mechanism%20for%20different%20interpretation%20of%20W3C%20XML-Schema%20specification%20%3F&amp;In-Reply-To=%253C37882D6E3A594A75877F0E165ACABD2A%40Sealion%253E&amp;References=%253C37882D6E3A594A75877F0E165ACABD2A%40Sealion%253E">noah_mendelsohn&#x40;&#0117;&#0115;&#0046;&#0105;&#0098;&#0109;&#0046;&#0099;&#0111;&#0109;</a> [mailto:<a href="mailto:noah_mendelsohn&#x40;&#0117;&#0115;&#0046;&#0105;&#0098;&#0109;&#0046;&#0099;&#0111;&#0109;?Subject=RE%3A%20Escalation%20mechanism%20for%20different%20interpretation%20of%20W3C%20XML-Schema%20specification%20%3F&amp;In-Reply-To=%253C37882D6E3A594A75877F0E165ACABD2A%40Sealion%253E&amp;References=%253C37882D6E3A594A75877F0E165ACABD2A%40Sealion%253E">noah_mendelsohn&#x40;&#0117;&#0115;&#0046;&#0105;&#0098;&#0109;&#0046;&#0099;&#0111;&#0109;</a>] 
&gt; Sent: 16 October 2009 21:35
&gt; To: <a title="Interview Michael Kay - W3C XML Member and Founder of Saxonica" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/michael_kay.html">Michael Kay</a>
&gt; Cc: 'Henry S. Thompson'; 'XMLSchema at XML4Pharma'; 
&gt; <a href="mailto:xmlschema-dev&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;?Subject=RE%3A%20Escalation%20mechanism%20for%20different%20interpretation%20of%20W3C%20XML-Schema%20specification%20%3F&amp;In-Reply-To=%253C37882D6E3A594A75877F0E165ACABD2A%40Sealion%253E&amp;References=%253C37882D6E3A594A75877F0E165ACABD2A%40Sealion%253E">xmlschema-dev&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;</a>
&gt; Subject: RE: Escalation mechanism for different 
&gt; interpretation of W3C XML-<a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/w3c/schema0/_index.htm">Schema specification</a> ?
&gt; 
&gt; Michal Kay writes;
&gt; 
&gt; &gt; It's not clear what answers it gives for more complex redefinition 
&gt; &gt; graphs.
&gt; 
&gt; Well, it's been a long time since I've looked at it.  I guess 
&gt; I assume that all redefinition graphs are in fact trees, I.e. 
&gt; each redefine can redefine only one thing

Well, there's a graph of <a title="schema documents" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema_editor.html">schema documents</a>, and a graph of components. If
there's a cycle in the graph of schema documents then there's potential (but
not the necessity) of a cycle at the level of components. A cycle at the
component level is clearly a nonsense, and my inclination is that the same
is true at the document level.

Even without cycles, though, it's not clear to me how ACSOOD handles:

A includes B
A includes C
B redefines X defining a restriction of type T
C redefines X defining a (different) restriction of type T

Perhaps you just let it be caught by the general ban on duplicate
components. But unless you're careful about the wording, that ban also
catches you out on a linear chain of redefinitions.

I noted the statement in your proposal: &quot;Note that the information needed to
determine a redeclaration prototype is easily determined from the
&lt;redefine&gt;ing XML schema document;  the text of a redeclaration always
explicitly refers to the particular schema document containing
(specification of) the component being redefined. &quot; I was surprised to see
this, but I now see that the spec does say (in Schema Representation
Constraint: Individual Component Redefinition) &quot;In all cases there must be a
top-level definition item of the appropriate name and kind in the
&lt;redefine&gt;d schema document.&quot; I now realise I haven't been enforcing that
rule: I only require it to be present in &quot;the schema corresponding to&quot; the
&lt;redefine&gt;d schema document. If A includes B, and R redefines A, then I
allow R to contain redefinitions of components that are actually <a title="An Introduction to XML Schema Development" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/videos/xmlschema1/xmlschema1.html">defined in
schema</a> document B. And the Dutch schema I've been working on today
(http://standaarden.overheid.nl/vac/1.1/xsd/vac.xsd) certainly takes
advantage<a title="XML DOM" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/dom.html"> of that freedom</a>.

&gt; 
&gt; &gt; And it doesn't appear to have anything to say about 
&gt; chameleon include.
&gt; 
&gt; ...  I think this probably means that I would have to augment my 
&gt; list of schema document abstraction to actually make it a 
&gt; list of (schemadoc, targetNamespace) pairs, 

That's precisely what I do in my implementation.

Regards,

Michael Kay
http://www.saxonica.com/
http://twitter.com/michaelhkay 
</pre>
<span id="received"><dfn>Received on</dfn> Friday, 16 October 2009 21:22:41 GMT</span>
</div>
]]></content></entry><entry><title>RE: Escalation mechanism for different interpretation of W3C XML-Schema specification ? </title><id>http://xsd.stylusstudio.com/2009Oct/post03003.htm</id><link rel="alternate" type="text/html" href="http://xsd.stylusstudio.com/2009Oct/post03003.htm" /><updated>2009-10-16T21:11:58Z</updated><content type="text/plain"><![CDATA[<pre id="body">
<a name="start33" accesskey="j" id="start33"></a>&gt; While my 
&gt; ACSOOD proposal remains very incomplete and has a variety of 
&gt; problems, I think it does more or less signal my thinking 
&gt; about questions like this [1]. 
&gt; 

Yes. It's close the the way I think about it. It appears to handle a chain
of redefinition (A redefines B, B redefines C) in the same way as I do. It's
not clear what answers it gives for more complex redefinition graphs.

And it doesn't appear to have anything to say about chameleon include.

Regards,

<a title="Interview Michael Kay - W3C XML Member and Founder of Saxonica" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/michael_kay.html">Michael Kay</a>
http://www.saxonica.com/
http://twitter.com/michaelhkay 
  
</pre>
<span id="received"><dfn>Received on</dfn> Friday, 16 October 2009 20:12:32 GMT</span>
</div>
]]></content></entry><entry><title>RE: Escalation mechanism for different interpretation of W3C XML-Schema  specification ? </title><id>http://xsd.stylusstudio.com/2009Oct/post06003.htm</id><link rel="alternate" type="text/html" href="http://xsd.stylusstudio.com/2009Oct/post06003.htm" /><updated>2009-10-16T17:57:20Z</updated><content type="text/plain"><![CDATA[<pre id="body">
<a name="start36" accesskey="j" id="start36"></a><a title="Interview Michael Kay - W3C XML Member and Founder of Saxonica" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/michael_kay.html">Michael Kay</a> writes:

&gt; Perhaps you just let it be caught by the general ban on duplicate
&gt; components.
 That was the idea.

&gt; But unless you're careful about the wording, that ban also
&gt; catches you out on a linear chain of redefinitions.

I'm pretty sure that's handled OK.  Specifically, the text that says:

&quot;Check for duplicate names (I.e. two or more definitions among the union 
of components and prototype components of the same global name in the same 
symbol set) and reflect a violation of the appropriate constraint if 
found.  Note that redeclaration-prototypes need not be checked for 
duplicates, as each necessarily redefines a similarly named 
prototype-component. &quot;

At this stage of the processing, the redeclarations are all tracked in a 
set of redeclaration-prototypes, which is not set that's being checked for 
duplicate names in the same symbol space.  Once this check for duplicates 
is passed, then the redefinitions are processed. 

&gt; If there's a cycle in the graph of <a title="schema documents" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema_editor.html">schema documents</a> then 
&gt; there's potential (but not the necessity) of a cycle at the 
&gt; level of components. A cycle at the
&gt; component level is clearly a nonsense, and my inclination is 
&gt; that the same is true at the document level.

I think I had convinced myself that there could not be a cycle at the 
document level, but I'm not remembering why I came to that conclusion. 
Certainly the set-of-named-documents approach ACSOOD takes to includes and 
imports means that cycles aren't treated as a problem, but are handled. If 
A.xsd and B.xsd mutually include each other, then each is added to the set 
once (it's a set, so there's no other option) and processed.

As to redefine, if A.xsd redefines T in B.xsd, and B.xsd redefines T in 
A.xsd, then I THINK the same text you newly discovered forces an error. 
There MUST be an explicit top level declaration for T in both A.xsd and 
B.xsd, or the clause you cite triggers failure.  If there are explicit top 
level declarations, then the ACSOOD &quot;check for duplicate names&quot; clause 
quoted above triggers a different error.  So, I think redefine cycles are 
ruled out by ACSOOD, and probably by most reasonable readings of the text 
you discovered.

&gt; That's precisely what I do in my implementation.

Well, I have the general sense that ACSOOD and your implementation are 
very much the same in spirit, if not in every detail.  I suppose that's 
promising in some way or other, but I'm not clear on how it helps us move 
ahead this point.  At the very least, it's somewhat gratifying to me 
personally.

--------------------------------------
Noah Mendelsohn 
IBM Corporation
One Rogers Street
Cambridge, MA 02142
1-617-693-4036
--------------------------------------








&quot;Michael Kay&quot; &lt;<a href="mailto:mike&#x40;&#0115;&#0097;&#0120;&#0111;&#0110;&#0105;&#0099;&#0097;&#0046;&#0099;&#0111;&#0109;?Subject=RE%3A%20Escalation%20mechanism%20for%20different%20interpretation%20of%20W3C%20XML-Schema%20%20specification%20%3F&amp;In-Reply-To=%253COF2BC1C1C8.7A8560E8-ON85257651.00777DC6-85257651.00789B85%40lotus.com%253E&amp;References=%253COF2BC1C1C8.7A8560E8-ON85257651.00777DC6-85257651.00789B85%40lotus.com%253E">mike&#x40;&#0115;&#0097;&#0120;&#0111;&#0110;&#0105;&#0099;&#0097;&#0046;&#0099;&#0111;&#0109;</a>&gt;
10/16/2009 05:22 PM
 
        To:     &lt;<a href="mailto:noah_mendelsohn&#x40;&#0117;&#0115;&#0046;&#0105;&#0098;&#0109;&#0046;&#0099;&#0111;&#0109;?Subject=RE%3A%20Escalation%20mechanism%20for%20different%20interpretation%20of%20W3C%20XML-Schema%20%20specification%20%3F&amp;In-Reply-To=%253COF2BC1C1C8.7A8560E8-ON85257651.00777DC6-85257651.00789B85%40lotus.com%253E&amp;References=%253COF2BC1C1C8.7A8560E8-ON85257651.00777DC6-85257651.00789B85%40lotus.com%253E">noah_mendelsohn&#x40;&#0117;&#0115;&#0046;&#0105;&#0098;&#0109;&#0046;&#0099;&#0111;&#0109;</a>&gt;
        cc:     &quot;'Henry S. Thompson'&quot; &lt;<a href="mailto:ht&#x40;&#0105;&#0110;&#0102;&#0046;&#0101;&#0100;&#0046;&#0097;&#0099;&#0046;&#0117;&#0107;?Subject=RE%3A%20Escalation%20mechanism%20for%20different%20interpretation%20of%20W3C%20XML-Schema%20%20specification%20%3F&amp;In-Reply-To=%253COF2BC1C1C8.7A8560E8-ON85257651.00777DC6-85257651.00789B85%40lotus.com%253E&amp;References=%253COF2BC1C1C8.7A8560E8-ON85257651.00777DC6-85257651.00789B85%40lotus.com%253E">ht&#x40;&#0105;&#0110;&#0102;&#0046;&#0101;&#0100;&#0046;&#0097;&#0099;&#0046;&#0117;&#0107;</a>&gt;, &quot;'XMLSchema at 
XML4Pharma'&quot; &lt;<a href="mailto:XMLSchema&#x40;&#0088;&#0077;&#0076;&#0052;&#0080;&#0104;&#0097;&#0114;&#0109;&#0097;&#0046;&#0099;&#0111;&#0109;?Subject=RE%3A%20Escalation%20mechanism%20for%20different%20interpretation%20of%20W3C%20XML-Schema%20%20specification%20%3F&amp;In-Reply-To=%253COF2BC1C1C8.7A8560E8-ON85257651.00777DC6-85257651.00789B85%40lotus.com%253E&amp;References=%253COF2BC1C1C8.7A8560E8-ON85257651.00777DC6-85257651.00789B85%40lotus.com%253E">XMLSchema&#x40;&#0088;&#0077;&#0076;&#0052;&#0080;&#0104;&#0097;&#0114;&#0109;&#0097;&#0046;&#0099;&#0111;&#0109;</a>&gt;, &lt;<a href="mailto:xmlschema-dev&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;?Subject=RE%3A%20Escalation%20mechanism%20for%20different%20interpretation%20of%20W3C%20XML-Schema%20%20specification%20%3F&amp;In-Reply-To=%253COF2BC1C1C8.7A8560E8-ON85257651.00777DC6-85257651.00789B85%40lotus.com%253E&amp;References=%253COF2BC1C1C8.7A8560E8-ON85257651.00777DC6-85257651.00789B85%40lotus.com%253E">xmlschema-dev&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;</a>&gt;
        Subject:        RE: Escalation mechanism for different 
interpretation of W3C XML-Schema specification ?


 

&gt; -----Original Message-----
&gt; From: <a href="mailto:noah_mendelsohn&#x40;&#0117;&#0115;&#0046;&#0105;&#0098;&#0109;&#0046;&#0099;&#0111;&#0109;?Subject=RE%3A%20Escalation%20mechanism%20for%20different%20interpretation%20of%20W3C%20XML-Schema%20%20specification%20%3F&amp;In-Reply-To=%253COF2BC1C1C8.7A8560E8-ON85257651.00777DC6-85257651.00789B85%40lotus.com%253E&amp;References=%253COF2BC1C1C8.7A8560E8-ON85257651.00777DC6-85257651.00789B85%40lotus.com%253E">noah_mendelsohn&#x40;&#0117;&#0115;&#0046;&#0105;&#0098;&#0109;&#0046;&#0099;&#0111;&#0109;</a> [mailto:<a href="mailto:noah_mendelsohn&#x40;&#0117;&#0115;&#0046;&#0105;&#0098;&#0109;&#0046;&#0099;&#0111;&#0109;?Subject=RE%3A%20Escalation%20mechanism%20for%20different%20interpretation%20of%20W3C%20XML-Schema%20%20specification%20%3F&amp;In-Reply-To=%253COF2BC1C1C8.7A8560E8-ON85257651.00777DC6-85257651.00789B85%40lotus.com%253E&amp;References=%253COF2BC1C1C8.7A8560E8-ON85257651.00777DC6-85257651.00789B85%40lotus.com%253E">noah_mendelsohn&#x40;&#0117;&#0115;&#0046;&#0105;&#0098;&#0109;&#0046;&#0099;&#0111;&#0109;</a>] 
&gt; Sent: 16 October 2009 21:35
&gt; To: Michael Kay
&gt; Cc: 'Henry S. Thompson'; 'XMLSchema at XML4Pharma'; 
&gt; <a href="mailto:xmlschema-dev&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;?Subject=RE%3A%20Escalation%20mechanism%20for%20different%20interpretation%20of%20W3C%20XML-Schema%20%20specification%20%3F&amp;In-Reply-To=%253COF2BC1C1C8.7A8560E8-ON85257651.00777DC6-85257651.00789B85%40lotus.com%253E&amp;References=%253COF2BC1C1C8.7A8560E8-ON85257651.00777DC6-85257651.00789B85%40lotus.com%253E">xmlschema-dev&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;</a>
&gt; Subject: RE: Escalation mechanism for different 
&gt; interpretation of W3C XML-Schema specification ?
&gt; 
&gt; Michal Kay writes;
&gt; 
&gt; &gt; It's not clear what answers it gives for more complex redefinition 
&gt; &gt; graphs.
&gt; 
&gt; Well, it's been a long time since I've looked at it.  I guess 
&gt; I assume that all redefinition graphs are in fact trees, I.e. 
&gt; each redefine can redefine only one thing

Well, there's a graph of schema documents, and a graph of components. If
there's a cycle in the graph of schema documents then there's potential 
(but
not the necessity) of a cycle at the level of components. A cycle at the
component level is clearly a nonsense, and my inclination is that the same
is true at the document level.

Even without cycles, though, it's not clear to me how ACSOOD handles:

A includes B
A includes C
B redefines X defining a restriction of type T
C redefines X defining a (different) restriction of type T

Perhaps you just let it be caught by the general ban on duplicate
components. But unless you're careful about the wording, that ban also
catches you out on a linear chain of redefinitions.

I noted the statement in your proposal: &quot;Note that the information needed 
to
determine a redeclaration prototype is easily determined from the
&lt;redefine&gt;ing XML schema document;  the text of a redeclaration always
explicitly refers to the particular schema document containing
(specification of) the component being redefined. &quot; I was surprised to see
this, but I now see that the spec does say (in Schema Representation
Constraint: Individual Component Redefinition) &quot;In all cases there must be 
a
top-level definition item of the appropriate name and kind in the
&lt;redefine&gt;d schema document.&quot; I now realise I haven't been enforcing that
rule: I only require it to be present in &quot;the schema corresponding to&quot; the
&lt;redefine&gt;d schema document. If A includes B, and R redefines A, then I
allow R to contain redefinitions of components that are actually defined 
in
schema document B. And the Dutch schema I've been working on today
(http://standaarden.overheid.nl/vac/1.1/xsd/vac.xsd) certainly takes
advantage of that freedom.

&gt; 
&gt; &gt; And it doesn't appear to have anything to say about 
&gt; chameleon include.
&gt; 
&gt; ...  I think this probably means that I would have to augment my 
&gt; list of schema document abstraction to actually make it a 
&gt; list of (schemadoc, targetNamespace) pairs, 

That's precisely what I do in my implementation.

Regards,

Michael Kay
http://www.saxonica.com/
http://twitter.com/michaelhkay 
</pre>
<span id="received"><dfn>Received on</dfn> Friday, 16 October 2009 21:58:03 GMT</span>
</div>
]]></content></entry><entry><title>RE: Escalation mechanism for different interpretation of W3C XML-Schema  specification ? </title><id>http://xsd.stylusstudio.com/2009Oct/post04003.htm</id><link rel="alternate" type="text/html" href="http://xsd.stylusstudio.com/2009Oct/post04003.htm" /><updated>2009-10-16T16:35:06Z</updated><content type="text/plain"><![CDATA[<pre id="body">
<a name="start34" accesskey="j" id="start34"></a>Michal Kay writes;

&gt; It's not clear what answers it gives for more complex 
&gt; redefinition graphs.

Well, it's been a long time since I've looked at it.  I guess I assume 
that all redefinition graphs are in fact trees, I.e. each redefine can 
redefine only one thing, and ultimately there is a path back up to the 
collection of the coponents you would have had if no redefinitions at all 
were done.  What I believe ACSOOD tries to do is, first collect all of the 
prototype components that are not themselves the result of redefines, then 
apply the redefinitions recursively, with each one being pervasive.  Is 
there a particular sample you have in mind for which ACSOOD doesn't signal 
a fairly clear direction?  You may well be right, but I'd be very curious 
to <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/learn_xml.html">learn</a> what it is.

&gt; And it doesn't appear to have anything to say about chameleon include.

I went back and looked at it.  You're right that it isn't dealt with 
explicitly. My suggestion would be that it be handled locally to the 
preparation of prototype components of each include step.  Thus, if a 
<a title="schema" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema.html">schema</a> with target namespace N included a schema doc with no explicit 
target NS, it would for ACSOOD purposes be as if the included document did 
have an explicit targetNamespace=&quot;N&quot;.  If that same document were included 
in another context, then that would be handled as a completely separate 
include, with the same rule applied.  I think this probably means that I 
would have to augment my list of <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema_editor.html">schema document</a> abstraction to actually 
make it a list of (<a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema_doc_gen.html">schemadoc</a>, targetNamespace) pairs, where in most cases 
the targetNamespace would be determined trivially from the schemadoc's 
attribute, but in the case of chameleon would be taken from the include 
statement.  This would allow the same schemadoc to be included in the list 
repeatedly, once for each targetNS.

Again, ACSOOD was an attempt to set down more crisply how I always thought 
the whole thing was working right along, though I later came to understand 
some of the ambiguities in the spec as written, and that other people have 
interpreted it differently.  I also am a little unhappy with the fact that 
ACSOOD depends in its current form on identify of schema documents (it has 
a set of them), which raises some nasty questions about cases in which 
schemaLocation URIs differ in, e.g., upper/lowercase, but in ways that we 
know won't affect the referent (e.g. http://xxx vs. HTTP://xxx)  ACSOOD 
more or less winds up treating these as distinct documents, potentially 
including them separately, and quite likely resulting in duplicate 
component errors.  Otherwise, I think it's in the ballpark.  Then again, I 
said as much in 2004, and it was clear that there were many differing 
opinions in the WG as to how things really work in 1.0, how they should 
work in 1.1, and especially in how to explain how they should work in 1.1. 
  I really don't want to reopen all of that here.  I'm just pointing to 
ACSOOD is a simple way of indicating what my personal assumptions have 
been about how redefine should work.

Noah

--------------------------------------
Noah Mendelsohn 
IBM Corporation
One Rogers Street
Cambridge, MA 02142
1-617-693-4036
--------------------------------------








&quot;<a title="Interview Michael Kay - W3C XML Member and Founder of Saxonica" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/michael_kay.html">Michael Kay</a>&quot; &lt;<a href="mailto:mike&#x40;&#0115;&#0097;&#0120;&#0111;&#0110;&#0105;&#0099;&#0097;&#0046;&#0099;&#0111;&#0109;?Subject=RE%3A%20Escalation%20mechanism%20for%20different%20interpretation%20of%20W3C%20XML-Schema%20%20specification%20%3F&amp;In-Reply-To=%253COF3A6882EB.E0EF4280-ON85257651.006FD574-85257651.0071177B%40lotus.com%253E&amp;References=%253COF3A6882EB.E0EF4280-ON85257651.006FD574-85257651.0071177B%40lotus.com%253E">mike&#x40;&#0115;&#0097;&#0120;&#0111;&#0110;&#0105;&#0099;&#0097;&#0046;&#0099;&#0111;&#0109;</a>&gt;
10/16/2009 04:11 PM
 
        To:     &lt;<a href="mailto:noah_mendelsohn&#x40;&#0117;&#0115;&#0046;&#0105;&#0098;&#0109;&#0046;&#0099;&#0111;&#0109;?Subject=RE%3A%20Escalation%20mechanism%20for%20different%20interpretation%20of%20W3C%20XML-Schema%20%20specification%20%3F&amp;In-Reply-To=%253COF3A6882EB.E0EF4280-ON85257651.006FD574-85257651.0071177B%40lotus.com%253E&amp;References=%253COF3A6882EB.E0EF4280-ON85257651.006FD574-85257651.0071177B%40lotus.com%253E">noah_mendelsohn&#x40;&#0117;&#0115;&#0046;&#0105;&#0098;&#0109;&#0046;&#0099;&#0111;&#0109;</a>&gt;
        cc:     &quot;'Henry S. Thompson'&quot; &lt;<a href="mailto:ht&#x40;&#0105;&#0110;&#0102;&#0046;&#0101;&#0100;&#0046;&#0097;&#0099;&#0046;&#0117;&#0107;?Subject=RE%3A%20Escalation%20mechanism%20for%20different%20interpretation%20of%20W3C%20XML-Schema%20%20specification%20%3F&amp;In-Reply-To=%253COF3A6882EB.E0EF4280-ON85257651.006FD574-85257651.0071177B%40lotus.com%253E&amp;References=%253COF3A6882EB.E0EF4280-ON85257651.006FD574-85257651.0071177B%40lotus.com%253E">ht&#x40;&#0105;&#0110;&#0102;&#0046;&#0101;&#0100;&#0046;&#0097;&#0099;&#0046;&#0117;&#0107;</a>&gt;, &quot;'XMLSchema at 
XML4Pharma'&quot; &lt;<a href="mailto:XMLSchema&#x40;&#0088;&#0077;&#0076;&#0052;&#0080;&#0104;&#0097;&#0114;&#0109;&#0097;&#0046;&#0099;&#0111;&#0109;?Subject=RE%3A%20Escalation%20mechanism%20for%20different%20interpretation%20of%20W3C%20XML-Schema%20%20specification%20%3F&amp;In-Reply-To=%253COF3A6882EB.E0EF4280-ON85257651.006FD574-85257651.0071177B%40lotus.com%253E&amp;References=%253COF3A6882EB.E0EF4280-ON85257651.006FD574-85257651.0071177B%40lotus.com%253E">XMLSchema&#x40;&#0088;&#0077;&#0076;&#0052;&#0080;&#0104;&#0097;&#0114;&#0109;&#0097;&#0046;&#0099;&#0111;&#0109;</a>&gt;, &lt;<a href="mailto:xmlschema-dev&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;?Subject=RE%3A%20Escalation%20mechanism%20for%20different%20interpretation%20of%20W3C%20XML-Schema%20%20specification%20%3F&amp;In-Reply-To=%253COF3A6882EB.E0EF4280-ON85257651.006FD574-85257651.0071177B%40lotus.com%253E&amp;References=%253COF3A6882EB.E0EF4280-ON85257651.006FD574-85257651.0071177B%40lotus.com%253E">xmlschema-dev&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;</a>&gt;
        Subject:        RE: Escalation mechanism for different 
interpretation of W3C XML-Schema specification ?


&gt; While my 
&gt; ACSOOD proposal remains very incomplete and has a variety of 
&gt; problems, I think it does more or less signal my thinking 
&gt; about questions like this [1]. 
&gt; 

Yes. It's close the the way I think about it. It appears to handle a chain
of redefinition (A redefines B, B redefines C) in the same way as I do. 
It's
not clear what answers it gives for more complex redefinition graphs.

And it doesn't appear to have anything to say about chameleon include.

Regards,

Michael Kay
http://www.saxonica.com/
http://twitter.com/michaelhkay 
 
</pre>
<span id="received"><dfn>Received on</dfn> Friday, 16 October 2009 20:35:59 GMT</span>
</div>
]]></content></entry><entry><title>RE: Escalation mechanism for different interpretation of W3C XML-Schema  specification ? </title><id>http://xsd.stylusstudio.com/2009Oct/post02003.htm</id><link rel="alternate" type="text/html" href="http://xsd.stylusstudio.com/2009Oct/post02003.htm" /><updated>2009-10-16T14:59:13Z</updated><content type="text/plain"><![CDATA[<pre id="body">
<a name="start32" accesskey="j" id="start32"></a><a title="Interview Michael Kay - W3C XML Member and Founder of Saxonica" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/michael_kay.html">Michael Kay</a> writes:

&gt; Because the common components have been copied into three different
&gt; namespaces, a redefine occurring in one namespace does not 
&gt; affect copies of
&gt; the component in a different namespace. That's <a title="Saxon" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/saxon_xquery_processor.html">Saxon</a>'s interpretation,
&gt; anyway. You could take the view that the &quot;pervasiveness&quot; of redefinition
&gt; makes it transcend the <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_grid_view.html">renaming</a> done by the chameleon include, 
&gt; but I don't.

FWIW, I don't either.  More specifically, if you'd asked me not about the 
text of the Recommendation as it came out (which I think we've established 
is somewhat self-contradictory and thus interpreted differently by 
different readers), but about what I thought we were trying to say as we 
all wrote that, I agree with you.  While my ACSOOD proposal remains very 
incomplete and has a variety of problems, I think it does more or less 
signal my thinking about questions like this [1]. 

BTW: this proposal gets referenced from time to time, and as far as I can 
tell the only copy remains in member-only space.  If there's a way to do 
it without inconveniencing the chair or working group members, I will try 
to get permission post another public copy, perhaps in the W3C public 
archives.  I think it's useful for references like this to be public when 
practical.  (I am not proposing to start active <a title="discussion" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/SSDN/default.asp">discussion</a> of it now, but 
every few years an email thread like this pops up, and I find it 
inconvenient to have links that can't be read outside of W3C.   I'll ask 
on the working group's list, which is the right place to do it.  In the 
meantime, apologies to readers outside the WG who can't see it.  FYI, we 
were (in 2004!) making a major effort to clarify the composition story for 
<a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema.html">XSD</a> 1.1.  The paper reference at [1] was an experimental attempt by me to 
create a design that would capture what I thought we intended in XSD 1.0. 
I think there are some good ideas in it, but it's also incomplete and has 
a number of problems.  Other important proposals were made by other 
working group members, many months were spent trying to extract from all 
of this a story that would garner consensus as a better explanation than 
the one we had in XSD 1.0, and to a signficant degree we failed.  So, I 
refer to this only because with respect to issues like the ones Mike 
raises, some of my thinking is captured in more detail at [1].

Noah

[1] 
http://lists.w3.org/Archives/Member/w3c-xml-schema-ig/2004Jul/att-0004/CompositionArchitecture.html


--------------------------------------
Noah Mendelsohn 
IBM Corporation
One Rogers Street
Cambridge, MA 02142
1-617-693-4036
--------------------------------------








&quot;Michael Kay&quot; &lt;<a href="mailto:mike&#x40;&#0115;&#0097;&#0120;&#0111;&#0110;&#0105;&#0099;&#0097;&#0046;&#0099;&#0111;&#0109;?Subject=RE%3A%20Escalation%20mechanism%20for%20different%20interpretation%20of%20W3C%20XML-Schema%20%20specification%20%3F&amp;In-Reply-To=%253COFF825BCFE.365D602F-ON85257651.0057AAD1-85257651.00685031%40lotus.com%253E&amp;References=%253COFF825BCFE.365D602F-ON85257651.0057AAD1-85257651.00685031%40lotus.com%253E">mike&#x40;&#0115;&#0097;&#0120;&#0111;&#0110;&#0105;&#0099;&#0097;&#0046;&#0099;&#0111;&#0109;</a>&gt;
Sent by: <a href="mailto:xmlschema-dev-request&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;?Subject=RE%3A%20Escalation%20mechanism%20for%20different%20interpretation%20of%20W3C%20XML-Schema%20%20specification%20%3F&amp;In-Reply-To=%253COFF825BCFE.365D602F-ON85257651.0057AAD1-85257651.00685031%40lotus.com%253E&amp;References=%253COFF825BCFE.365D602F-ON85257651.0057AAD1-85257651.00685031%40lotus.com%253E">xmlschema-dev-request&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;</a>
10/16/2009 09:29 AM
 
        To:     &quot;'Henry S. Thompson'&quot; &lt;<a href="mailto:ht&#x40;&#0105;&#0110;&#0102;&#0046;&#0101;&#0100;&#0046;&#0097;&#0099;&#0046;&#0117;&#0107;?Subject=RE%3A%20Escalation%20mechanism%20for%20different%20interpretation%20of%20W3C%20XML-Schema%20%20specification%20%3F&amp;In-Reply-To=%253COFF825BCFE.365D602F-ON85257651.0057AAD1-85257651.00685031%40lotus.com%253E&amp;References=%253COFF825BCFE.365D602F-ON85257651.0057AAD1-85257651.00685031%40lotus.com%253E">ht&#x40;&#0105;&#0110;&#0102;&#0046;&#0101;&#0100;&#0046;&#0097;&#0099;&#0046;&#0117;&#0107;</a>&gt;
        cc:     &quot;'XMLSchema at XML4Pharma'&quot; &lt;<a href="mailto:XMLSchema&#x40;&#0088;&#0077;&#0076;&#0052;&#0080;&#0104;&#0097;&#0114;&#0109;&#0097;&#0046;&#0099;&#0111;&#0109;?Subject=RE%3A%20Escalation%20mechanism%20for%20different%20interpretation%20of%20W3C%20XML-Schema%20%20specification%20%3F&amp;In-Reply-To=%253COFF825BCFE.365D602F-ON85257651.0057AAD1-85257651.00685031%40lotus.com%253E&amp;References=%253COFF825BCFE.365D602F-ON85257651.0057AAD1-85257651.00685031%40lotus.com%253E">XMLSchema&#x40;&#0088;&#0077;&#0076;&#0052;&#0080;&#0104;&#0097;&#0114;&#0109;&#0097;&#0046;&#0099;&#0111;&#0109;</a>&gt;, 
&lt;<a href="mailto:xmlschema-dev&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;?Subject=RE%3A%20Escalation%20mechanism%20for%20different%20interpretation%20of%20W3C%20XML-Schema%20%20specification%20%3F&amp;In-Reply-To=%253COFF825BCFE.365D602F-ON85257651.0057AAD1-85257651.00685031%40lotus.com%253E&amp;References=%253COFF825BCFE.365D602F-ON85257651.0057AAD1-85257651.00685031%40lotus.com%253E">xmlschema-dev&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;</a>&gt;, (bcc: Noah Mendelsohn/Cambridge/IBM)
        Subject:        RE: Escalation mechanism for different 
interpretation of W3C XML-Schema specification ?


&gt; Hmmm -- let's leave redefine aside, as we've agreed to differ 
&gt; on that before, but I'm surprised you recommend against 
&gt; chameleon include.  I find it hugely useful (for those little 
&gt; bits that you use all the time but aren't worth putting in a 
&gt; namespace) and am not aware of any interop problems with it. . .

I've been working on a bug report relating to a Dutch government schema
published at 

http://standaarden.overheid.nl/vac/1.1/xsd/vac.xsd

which makes extensive use of redefines and chameleon include. I've fixed 
the
bug that stopped this working under Saxon 9.2, but I would make some
observations on the schema, which are I think rather pertinent to this
thread.

There's a cluster of three no-namespace schema documents (overheid-types,
overheid-classes, overheid-schemes) that are chameleon-included into three
different namespaces (short names /vac/, /dc/terms/, and /owms/terms/). 
The
effect of this is to create three near-identical copies of each of the
components defined in these three schema documents, one in each namespace.
This means that as far as XSLT and XQuery are concerned, 
elements/attributes
defined in terms of these types will be unrelated to each other in the 
type
hierarchy, which means that writing schema-aware stylesheets and queries 
is
likely to be very confusing. This is probably one of the main reasons I'm
not a fan of chameleon include.

But that's not all: the schema also makes heavy use of redefines.
Specifically, if we call this no-namespace cluster COMMON, we have the
structure (slightly simplified to capture the essence):

Namespace /vac/
vac.xsd includes COMMON
vac.xsd imports owms-classes-redef.xsd
vac.xsd imports overheid-classes-redef.xsd

Namespace /dc/terms/
owms-classes-redef.xsd redefines dcterms-elem.xsd
dcterms-elem.xsd includes COMMON

Namespace /owms/terms/
overheid-classes-redef.xsd redefines owns.xsd
owms.xsd includes COMMON
owms.xsd imports dcterms-elem.xsd

Note that dcterms-elem.xsd is reachable from vac.xsd via one route that
contain a &quot;redefines&quot; step, and by another route that omits this step (but
which does contain a different redefines step). This is where the
interpretation of &quot;pervasiveness&quot; is critical: Saxon takes the view that 
all
references to components that have been redefined are references to the
post-redefinition component. In fact the rule introduced in Saxon 9.2 
(whose
incorrect implementation caused the bug) is that every component has a
redefinition level, so if A redefines B and B redefines C then a given
component may have redefinition levels of 2, 1, and 0; all references to a
component name are taken as references to the highest available 
redefinition
level, and if there are two different components at the highest 
redefinition
level, it's an error (for example, A redefines C, and B also redefines C).
There's nothing at all in the spec to justify these rules, but it's the 
only
way I could find of handling complex redefinition lattices that seemed to
make sense.

But the chameleon includes interfere with this (perhaps deliberately).
Because the common components have been copied into three different
namespaces, a redefine occurring in one namespace does not affect copies 
of
the component in a different namespace. That's Saxon's interpretation,
anyway. You could take the view that the &quot;pervasiveness&quot; of redefinition
makes it transcend the renaming done by the chameleon include, but I 
don't.

In experimenting further with this schema, I discovered that if the two
imports from vac.xsd are reversed in order, the import of
owms-classes-redef.xsd has no effect, because it is then importing a
namespace that is already known to the processor; Saxon ignores the
schemaLocation URI in this case. So the schema document
owms-classes-redef.xsd, and the redefinitions that it contains, are simply
ignored. This makes the situation very fragile: reversing the order of
imports does not make the processing fail, it just silently compiles a
different schema. I think this reinforces Henry's argument that if you're
going to redefine, then there should be one redefining document for each
namespace, which acts as a gateway to that namespace, and no other
includes/imports/redefines from elsewhere in the schema should bypass this
gateway. This schema breaks this rule, and gets away with it only because 
of
gateway document is encountered before the bypassing document.

Michael Kay
Saxonica
</pre>
<span id="received"><dfn>Received on</dfn> Friday, 16 October 2009 19:00:04 GMT</span>
</div>
]]></content></entry><entry><title>RE: Escalation mechanism for different interpretation of W3C XML-Schema specification ? </title><id>http://xsd.stylusstudio.com/2009Oct/post01003.htm</id><link rel="alternate" type="text/html" href="http://xsd.stylusstudio.com/2009Oct/post01003.htm" /><updated>2009-10-16T14:29:34Z</updated><content type="text/plain"><![CDATA[<pre id="body">
<a name="start31" accesskey="j" id="start31"></a>&gt; Hmmm -- let's leave redefine aside, as we've agreed to differ 
&gt; on that before, but I'm surprised you recommend against 
&gt; chameleon include.  I find it hugely useful (for those little 
&gt; bits that you use all the time but aren't worth putting in a 
&gt; namespace) and am not aware of any interop problems with it. . .

I've been working on a bug report relating to a Dutch government <a title="schema" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema.html">schema</a>
published at 

http://standaarden.overheid.nl/vac/1.1/xsd/vac.xsd

which makes extensive use of redefines and chameleon include. I've fixed the
bug that stopped this working under <a title="Saxon" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/saxon_xquery_processor.html">Saxon</a> 9.2, but I would make some
observations on the schema, which are I think rather pertinent to this
thread.

There's a cluster of three no-namespace <a title="schema documents" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema_editor.html">schema documents</a> (overheid-types,
overheid-classes, overheid-schemes) that are chameleon-included into three
different namespaces (short names /vac/, /dc/terms/, and /owms/terms/). The
effect of this is to create three near-identical copies of each of the
components <a title="An Introduction to XML Schema Development" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/videos/xmlschema1/xmlschema1.html">defined in these three schema</a> documents, one in each namespace.
This means that as far as <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xslt.html">XSLT</a> and XQuery are concerned, elements/attributes
defined in terms of these types will be unrelated to each other in the type
hierarchy, which means that writing <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/schema_aware.html">schema-aware</a> <a title="Stylesheet Designer" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/videos/publisher1/publisher1.html">stylesheets</a> and queries is
likely to be very confusing. This is probably one of the main reasons I'm
not a fan of chameleon include.

But that's not all: the schema also makes heavy use of redefines.
Specifically, if we call this no-namespace cluster COMMON, we have the
structure (slightly simplified to capture the essence):

Namespace /vac/
vac.xsd includes COMMON
vac.xsd imports owms-classes-redef.xsd
vac.xsd imports overheid-classes-redef.xsd

Namespace /dc/terms/
owms-classes-redef.xsd redefines dcterms-elem.xsd
dcterms-elem.xsd includes COMMON

Namespace /owms/terms/
overheid-classes-redef.xsd redefines owns.xsd
owms.xsd includes COMMON
owms.xsd imports dcterms-elem.xsd

Note that dcterms-elem.xsd is reachable from vac.xsd via one route that
contain a &quot;redefines&quot; step, and by another route that omits this step (but
which does contain a different redefines step). This is where the
interpretation of &quot;pervasiveness&quot; is critical: Saxon takes the view that all
references to components that have been redefined are references to the
post-redefinition component. In fact the rule introduced in Saxon 9.2 (whose
incorrect implementation caused the bug) is that every component has a
redefinition level, so if A redefines B and B redefines C then a given
component may have redefinition levels of 2, 1, and 0; all references to a
component name are taken as references to the highest available redefinition
level, and if there are two different components at the highest redefinition
level, it's an error (for example, A redefines C, and B also redefines C).
There's nothing at all in the spec to justify these rules, but it's the only
way I could find of handling complex redefinition lattices that seemed to
make sense.

But the chameleon includes interfere with this (perhaps deliberately).
Because the common components have been copied into three different
namespaces, a redefine occurring in one namespace does not affect copies of
the component in a different namespace. That's Saxon's interpretation,
anyway. You could take the view that the &quot;pervasiveness&quot; of redefinition
makes it transcend the renaming done by the chameleon include, but I don't.

In experimenting further with this schema, I discovered that if the two
imports from vac.xsd are reversed in order, the import of
owms-classes-redef.xsd has no effect, because it is then importing a
namespace that is already known to the processor; Saxon ignores the
schemaLocation URI in this case. So the schema document
owms-classes-redef.xsd, and the redefinitions that it contains, are simply
ignored. This makes the situation very fragile: reversing the order of
imports does not make the processing fail, it just silently compiles a
different schema. I think this reinforces Henry's argument that if you're
going to redefine, then there should be one redefining document for each
namespace, which acts as a gateway to that namespace, and no other
includes/imports/redefines from elsewhere in the schema should bypass this
gateway. This schema breaks this rule, and gets away with it only because of
gateway document is encountered before the bypassing document.

Michael Kay
Saxonica
</pre>
<span id="received"><dfn>Received on</dfn> Friday, 16 October 2009 13:30:19 GMT</span>
</div>
]]></content></entry><entry><title>RE: Escalation mechanism for different interpretation of W3C XML-Schema specification ? </title><id>http://xsd.stylusstudio.com/2009Oct/post09002.htm</id><link rel="alternate" type="text/html" href="http://xsd.stylusstudio.com/2009Oct/post09002.htm" /><updated>2009-10-12T21:04:47Z</updated><content type="text/plain"><![CDATA[<pre id="body">
<a name="start29" accesskey="j" id="start29"></a>&gt; Hmmm -- let's leave redefine aside, as we've agreed to differ 
&gt; on that before, but I'm surprised you recommend against 
&gt; chameleon include.  I find it hugely useful (for those little 
&gt; bits that you use all the time but aren't worth putting in a 
&gt; namespace) and am not aware of any interop problems with it. . .


Well, it's partly that if you allow the same data to be in different
namespaces at different times then it's much harder <a title="Working with XSLT" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/videos/xsltedit1/xsltedit1.html">to write reusable code
in XSLT</a>/XQuery etc that works regardless of which namespace has been chosen
today.

But it certainly can lead to problems of interpretation:

(a) problems hinging on the (<a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema.html">XSD</a> 1.0) phrase &quot;corresponds to a &lt;schema&gt;
element information item in a <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_well_formed.html">well-formed</a> information set, which in turn
corresponds to a valid schema.&quot; - the correspondence of the schema
information item to the valid schema is never spelt out, so it's not clear
for example if A does a chameleon include on B which imports C which imports
the no-namespace <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema_editor.html">schema document</a> D, whether components defined in D are
moved into the target namespace of A; especially if C or D are also
reachable by other routes.

(b) problems hinging on exactly where the substitution of targetNamespace
applies, for example, whether it affects <a title="XPath expressions" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xpath_evaluator.html">XPath expressions</a> in identity
constraints, QNames used in enumeration facets, or references to
no-namespace components <a title="Building XML Schemas" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/videos/xmlschema1/xmlschema1.html">defined in a schema</a> document that is not itself
within the scope of the chameleon include.

We've improved the rules for XSD 1.1, but it's still a facility I would be
inclined to avoid.

Regards,

<a title="Interview Michael Kay - W3C XML Member and Founder of Saxonica" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/michael_kay.html">Michael Kay</a>
http://www.saxonica.com/
http://twitter.com/michaelhkay 
</pre>
<span id="received"><dfn>Received on</dfn> Monday, 12 October 2009 20:05:28 GMT</span>
</div>
]]></content></entry><entry><title>Re: Escalation mechanism for different interpretation of W3C XML-Schema specification ? </title><id>http://xsd.stylusstudio.com/2009Oct/post08002.htm</id><link rel="alternate" type="text/html" href="http://xsd.stylusstudio.com/2009Oct/post08002.htm" /><updated>2009-10-12T20:38:15Z</updated><content type="text/plain"><![CDATA[<pre id="body">
<a name="start28" accesskey="j" id="start28"></a>-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

<a title="Interview Michael Kay - W3C XML Member and Founder of Saxonica" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/michael_kay.html">Michael Kay</a> writes:

&gt; I suspect, but without testing(!) that the strategy can be extended to
&gt; xs:redefine as follows:
&gt;
&gt; (a) if redefinition for a namespace is required, create a new <a title="schema" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema.html">schema</a>
&gt; document with that targetNamespace that invokes the (previous) primary
&gt; <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema_editor.html">schema document</a> for that namespace using xs:redefine, and contains all the
&gt; redefinitions needed.
&gt;
&gt; (b) change the driver document to refer to the redefinition documents
&gt; introduced in step (1) in place of the (previous) primary shcema documents.

Yes, that sounds right.

&gt; A similar approach might also work reliably for &quot;chameleon include&quot;.

Includes in general are less problematic, as there is no option for
processors -- they _must_ process the nominated schema document.

&gt; But better advice is not to use redefine or chameleon include.

Hmmm -- let's leave redefine aside, as we've agreed to differ on that
before, but I'm surprised you recommend against chameleon include.  I
find it hugely useful (for those little bits that you use all the time
but aren't worth putting in a namespace) and am not aware of any
interop problems with it. . .

ht
- -- 
       Henry S. Thompson, School of Informatics, University of Edinburgh
                         Half-time member of W3C Team
      10 Crichton Street, Edinburgh EH8 9AB, SCOTLAND -- (44) 131 650-4440
                Fax: (44) 131 651-1426, e-mail: <a href="mailto:ht&#x40;&#0105;&#0110;&#0102;&#0046;&#0101;&#0100;&#0046;&#0097;&#0099;&#0046;&#0117;&#0107;?Subject=Re%3A%20Escalation%20mechanism%20for%20different%20interpretation%20of%20W3C%20XML-Schema%20specification%20%3F&amp;In-Reply-To=%253Cf5bbpkcwggo.fsf%40hildegard.inf.ed.ac.uk%253E&amp;References=%253Cf5bbpkcwggo.fsf%40hildegard.inf.ed.ac.uk%253E">ht&#x40;&#0105;&#0110;&#0102;&#0046;&#0101;&#0100;&#0046;&#0097;&#0099;&#0046;&#0117;&#0107;</a>
                       URL: http://www.ltg.ed.ac.uk/~ht/
[mail really from me _always_ has this .sig -- mail without it is forged spam]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)

iD8DBQFK04WokjnJixAXWBoRAsvbAJ9nerp4yckxN4iPts1pBBDyZvyalgCaAzfm
mGqLLD1JN8IMkIsAynGy96k=
=Ot+l
-----END PGP SIGNATURE-----
</pre>
<span id="received"><dfn>Received on</dfn> Monday, 12 October 2009 19:38:48 GMT</span>
</div>
]]></content></entry><entry><title>Re: [XML Schema 1.1] Two ways to create interleaved, any-order content  ... are they identical? </title><id>http://xsd.stylusstudio.com/2009Oct/post00003.htm</id><link rel="alternate" type="text/html" href="http://xsd.stylusstudio.com/2009Oct/post00003.htm" /><updated>2009-10-12T18:02:10Z</updated><content type="text/plain"><![CDATA[<pre id="body">
<a name="start30" accesskey="j" id="start30"></a>
On 12 Oct 2009, at 11:00 , Costello, Roger L. wrote:

&gt;
&gt; Hi Folks,
&gt;
&gt; Below are two ways to declare a &lt;<a title="Book" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_book.html">Book</a>&gt; element.
&gt;
&gt; Both versions use &lt;all&gt;, to permit the elements within &lt;Book&gt; to  
&gt; occur in any order.
&gt;
&gt; The first version uses an unbounded &lt;any&gt;. The second version uses  
&gt; interleaved open content.
&gt;
&gt; Are these two versions identical?

You may mean &quot;Do they accept the same inputs as valid instances
of element Book?&quot; Yes, I think they do.


&gt; If so, is there an advantage of one over the other?

Some people may find one formulation clearer or simpler than the
other; they will rightly prefer the one they find clearer.  I
expect different people will have different preferences, depending
on their tastes.

If a <a title="schema" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema.html">schema</a> is designed so that ever complex type, or most of them,
has a particular form of open content, then the open content can
be defaulted at the <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema_editor.html">schema document</a> level, which will make most
content models shorter and simpler.  Readers who forget that the
schema document supplies default open content may be surprised and
complain about action at a distance.

In the case of all-groups, using an explicit wildcard and using
interleave open content are roughly similar in complexity of the
declaration.  In other cases, explicit wildcards are much more
verbose and for many schema authors rather error-prone.  See
http://www.<a title="w3" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/w3c/">w3</a>.org/TR/xmlschema-guide2versioning/ for examples.


&gt; If they are not identical, how do they differ?

You may mean &quot;Do they produce indistinguishable PSVIs?&quot;

No, not quite; the [match information] property in the PSVI allows
the two to be distinguished, for elements other than Author, Title,
Date, ISBN, and <a title="Stylus Studio XML Publisher" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml/publisher.html">Publisher</a>:  in the one case, those elements will have
[match information] = 'lax' (since they match a lax wildcard in the
content model), and in the other they will have [match information]
= 'open' (since they match open content).  This allows the
downstream application to distinguish the two cases, if it wishes to.

In the usual case, making downstream processing depend on such a subtle
distinction is probably not a good idea, but YMMV and there may be
special circumstances.  Certainly there are some designers who
like the idea of being able to say that if an element in the input
matches an element in the version N content model, then a
version N processor is obligated to process it in a certain
way, and if the element in the input matches a wildcard (or:
matches only open content) in the version N content model, then
a version N processor is obligated to tolerate it, or to ignore
it, or to handle it in some other way.  In such a design,
&quot;matches an element&quot; and &quot;matches a wildcard&quot; are syntax-level
signals for different kinds of processing.  The signal &quot;matches
an open-content wildcard&quot; can fit nicely into this pattern,
either to signal a third kind of processing or to shift the
distinction from element-vs-wildcard to content-model-vs-opencontent.

HTH


-- 
****************************************************************
* C. M. Sperberg-McQueen, Black Mesa Technologies LLC
* http://www.blackmesatech.com
* http://cmsmcq.com/mib
* http://balisage.net
****************************************************************
</pre>
<span id="received"><dfn>Received on</dfn> Tuesday, 13 October 2009 00:02:41 GMT</span>
</div>
]]></content></entry><entry><title>RE: Escalation mechanism for different interpretation of W3C XML-Schema specification ? </title><id>http://xsd.stylusstudio.com/2009Oct/post06002.htm</id><link rel="alternate" type="text/html" href="http://xsd.stylusstudio.com/2009Oct/post06002.htm" /><updated>2009-10-12T17:48:09Z</updated><content type="text/plain"><![CDATA[<pre id="body">
<a name="start26" accesskey="j" id="start26"></a>
I agree with all of this, but it leaves the question of xs:redefine.

I suspect, but without testing(!) that the strategy can be extended to
xs:redefine as follows:

(a) if redefinition for a namespace is required, create a new <a title="schema
document" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema_editor.html">schema
document</a> with that targetNamespace that invokes the (previous) primary
schema document for that namespace using xs:redefine, and contains all the
redefinitions needed.

(b) change the driver document to refer to the redefinition documents
introduced in step (1) in place of the (previous) primary shcema documents.

A similar approach might also work reliably for &quot;chameleon include&quot;.

But better advice is not to use redefine or chameleon include.

Regards,

<a title="Interview Michael Kay - W3C XML Member and Founder of Saxonica" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/michael_kay.html">Michael Kay</a>
http://www.saxonica.com/
http://twitter.com/michaelhkay 

 

&gt; -----Original Message-----
&gt; From: <a href="mailto:xmlschema-dev-request&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;?Subject=RE%3A%20Escalation%20mechanism%20for%20different%20interpretation%20of%20W3C%20XML-Schema%20specification%20%3F&amp;In-Reply-To=%253C0EEB8721B466440E84B6516E8FBCA998%40Sealion%253E&amp;References=%253C0EEB8721B466440E84B6516E8FBCA998%40Sealion%253E">xmlschema-dev-request&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;</a> 
&gt; [mailto:<a href="mailto:xmlschema-dev-request&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;?Subject=RE%3A%20Escalation%20mechanism%20for%20different%20interpretation%20of%20W3C%20XML-Schema%20specification%20%3F&amp;In-Reply-To=%253C0EEB8721B466440E84B6516E8FBCA998%40Sealion%253E&amp;References=%253C0EEB8721B466440E84B6516E8FBCA998%40Sealion%253E">xmlschema-dev-request&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;</a>] On Behalf Of Henry S. Thompson
&gt; Sent: 12 October 2009 16:40
&gt; To: XMLSchema at XML4Pharma
&gt; Cc: <a href="mailto:xmlschema-dev&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;?Subject=RE%3A%20Escalation%20mechanism%20for%20different%20interpretation%20of%20W3C%20XML-Schema%20specification%20%3F&amp;In-Reply-To=%253C0EEB8721B466440E84B6516E8FBCA998%40Sealion%253E&amp;References=%253C0EEB8721B466440E84B6516E8FBCA998%40Sealion%253E">xmlschema-dev&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;</a>
&gt; Subject: Re: Escalation mechanism for different 
&gt; interpretation of W3C XML-<a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/w3c/schema0/_index.htm">Schema specification</a> ?
&gt; 
&gt; -----BEGIN PGP SIGNED MESSAGE-----
&gt; Hash: SHA1
&gt; 
&gt; Stimulated in equal measure by this thread, and a request 
&gt; from the XML Security WG [0], I came up with my personal 
&gt; 'best practice' guideline for schema document design for 
&gt; multi-namespace schemas.  I include the core bit below -- for 
&gt; the full context and a worked example, see my reply to the 
&gt; DSIG WG [1].
&gt; 
&gt; ht
&gt; 
&gt; [0] 
&gt; http://lists.w3.org/Archives/Public/public-xmlsec/2009Oct/0019.html
&gt; [1] 
&gt; http://lists.w3.org/Archives/Public/public-xmlsec/2009Oct/0023.html
&gt; - -------------------------
&gt; HST's best practice guide for multiple-namespace schema composition
&gt; 
&gt; It's helpful in <a title="discussions" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/SSDN/default.asp">discussions</a> of this sort to be careful with
&gt; vocabulary:
&gt; 
&gt;   Schema document: An XML document in the W3C XML Schema namespace
&gt;   Schema: An abstract data object, typically composed from one or more
&gt;           schema documents according to the rules given in the W3C XML
&gt;           Schema specs.
&gt; 
&gt; A schema document specifies either one or no target namespace.
&gt; 
&gt; A schema may well contain element &amp; attribute declarations 
&gt; and/or type definitions for many target namespaces.
&gt; 
&gt; The W3C XML Schema specs provide a number of mechanisms for 
&gt; assembling the schema documents needed to construct a schema 
&gt; for a particular validation episode:
&gt; 
&gt;  1) the schemaLocation attribute on xs:include elements.
&gt;  2) xsi:schemaLocation (in the instance to be validated);
&gt;  3) the schemaLocation attribute on xs:import elements;
&gt;  4) the namespace URIs themselves (in the instance to be validated, or
&gt;     from the namespace attribute on xs:import elements);
&gt; 
&gt; Without going into the details of what's optional and what's 
&gt; required, or of the range of choices implementations exhibit, 
&gt; here's my recommendation for multi-namespace schemas:
&gt; 
&gt; 1) For each namespace in your language, there should be one primary
&gt;    schema document.  It may be the only schema document for that
&gt;    namespace, or it may use xs:include (which must have a
&gt;    schemaLocation attribute) to allow for modular development by
&gt;    including multiple as-it-were secondary schema documents;
&gt; 
&gt; 2) Whenever reference is made to names in another namespace from a
&gt;    primary or secondary schema document, use an xs:import _without_ a
&gt;    schemaLocation attribute;
&gt; 
&gt; 3) Create a driver schema document, whose target namespace is the
&gt;    namespace of the (most common) document element of instance
&gt;    documents in the language.  It should contain an xs:include of the
&gt;    primary schema document for that namespace, and xs:imports for all
&gt;    the other namespaces, _with_ schemaLocation attributes pointing to
&gt;    the primary schema documents for those other namespaces.
&gt; 
&gt; Then, by passing the location of the driver schema document 
&gt; to schema validation tools and/or by including an 
&gt; xsi:schemaLocation attribute on the document element of 
&gt; instances to be validated which associates the target 
&gt; namespace of the driver schema document with its location, 
&gt; you will get the behaviour you need from all the 
&gt; tools/implementations I am aware of.
&gt; 
&gt; Schematically, this looks like
&gt; 
&gt;                driver.xsd -- TNS = http://www.example.org/rootNS
&gt;                               /|\
&gt;                              / | \
&gt;                             /  |  \
&gt;                            /   |   \
&gt;                    xs:include  |    \
&gt;                    schemaLoc=  |     \
&gt;                         /      |      \
&gt;                        /   xs:import   \
&gt;                       /    NS=...NS2    \
&gt;                      /     schemaLoc=    \
&gt;                     /          |       xs:import
&gt;                    /           |       NS=...NS3
&gt;                   /            |       schemaLoc=
&gt;                  /             |             \
&gt;             primary1.xsd   primary2.xsd  primary3.xsd
&gt;             TNS=...rootNS   TNS=...NS2    TNS=...NS3    
&gt;                  / \                         /|\
&gt;                 /   \                       / | \
&gt;                /     \                     /  |  \
&gt;               /       \                   /   |   \
&gt;         xs:import  xs:import             /    |    \
&gt;         NS=...NS2  NS=...NS3      xs:include  |     \
&gt;                                   schemaLoc=  |      \
&gt;                                        /      |       \
&gt;                                   3.1.xsd     |        \
&gt;                                           xs:include    \
&gt;                                           schemaLoc=     \
&gt;                                               |           \
&gt;                                           3.2.xsd          \
&gt;                                                      xs:include
&gt;                                                      schemaLoc=
&gt;                                                           |
&gt;                                                      3.3.xsd
&gt; 
&gt; - -- 
&gt;        Henry S. Thompson, School of Informatics, University 
&gt; of Edinburgh
&gt;                          Half-time member of W3C Team
&gt;       10 Crichton Street, Edinburgh EH8 9AB, SCOTLAND -- (44) 
&gt; 131 650-4440
&gt;                 Fax: (44) 131 651-1426, e-mail: <a href="mailto:ht&#x40;&#0105;&#0110;&#0102;&#0046;&#0101;&#0100;&#0046;&#0097;&#0099;&#0046;&#0117;&#0107;?Subject=RE%3A%20Escalation%20mechanism%20for%20different%20interpretation%20of%20W3C%20XML-Schema%20specification%20%3F&amp;In-Reply-To=%253C0EEB8721B466440E84B6516E8FBCA998%40Sealion%253E&amp;References=%253C0EEB8721B466440E84B6516E8FBCA998%40Sealion%253E">ht&#x40;&#0105;&#0110;&#0102;&#0046;&#0101;&#0100;&#0046;&#0097;&#0099;&#0046;&#0117;&#0107;</a>
&gt;                        URL: http://www.ltg.ed.ac.uk/~ht/ 
&gt; [mail really from me _always_ has this .sig -- mail without 
&gt; it is forged spam] -----BEGIN PGP SIGNATURE-----
&gt; Version: GnuPG v1.2.6 (GNU/Linux)
&gt; 
&gt; iD8DBQFK0021kjnJixAXWBoRAmPMAJ9dLLKZsj+r2y/tUtIsJ/wAjuL0kQCfWwzT
&gt; LqnqG7FgzH5zwP3XMIrNsb4=
&gt; =vK80
&gt; -----END PGP SIGNATURE-----
&gt; 
</pre>
<span id="received"><dfn>Received on</dfn> Monday, 12 October 2009 16:48:52 GMT</span>
</div>
]]></content></entry><entry><title>Re: Escalation mechanism for different interpretation of W3C XML-Schema specification ? </title><id>http://xsd.stylusstudio.com/2009Oct/post05002.htm</id><link rel="alternate" type="text/html" href="http://xsd.stylusstudio.com/2009Oct/post05002.htm" /><updated>2009-10-12T16:39:33Z</updated><content type="text/plain"><![CDATA[<pre id="body">
<a name="start25" accesskey="j" id="start25"></a>-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Stimulated in equal measure by this thread, and a request from the XML
Security WG [0], I came up with my personal 'best practice' guideline
for <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema_editor.html">schema document</a> <a title="Building XML Schemas" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/videos/xmlschema1/xmlschema1.html">design for multi-namespace schemas</a>.  I include the
core bit below -- for the full context and a worked example, see my
reply to the DSIG WG [1].

ht

[0] http://lists.<a title="w3" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/w3c/">w3</a>.org/Archives/Public/public-xmlsec/2009Oct/0019.html
[1] http://lists.w3.org/Archives/Public/public-xmlsec/2009Oct/0023.html
- -------------------------
HST's best practice guide for multiple-namespace schema composition

It's helpful in <a title="discussions" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/SSDN/default.asp">discussions</a> of this sort to be careful with
vocabulary:

  Schema document: An XML document in the W3C XML Schema namespace
  Schema: An abstract data object, typically composed from one or more
          schema documents according to the rules given in the W3C <a title="XML
          Schema specs" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/w3c/schema0/_index.htm">XML
          Schema specs</a>.

A schema document specifies either one or no target namespace.

A schema may well contain element &amp; attribute declarations and/or type
definitions for many target namespaces.

The W3C XML Schema specs provide a number of mechanisms for assembling
the schema documents needed to construct a schema for a particular
validation episode:

 1) the schemaLocation attribute on xs:include elements.
 2) xsi:schemaLocation (in the instance to be validated);
 3) the schemaLocation attribute on xs:import elements;
 4) the namespace URIs themselves (in the instance to be validated, or
    from the namespace attribute on xs:import elements);

Without going into the details of what's optional and what's required,
or of the range of choices implementations exhibit, here's my
recommendation for multi-namespace schemas:

1) For each namespace in your language, there should be one primary
   schema document.  It may be the only schema document for that
   namespace, or it may use xs:include (which must have a
   schemaLocation attribute) to allow for modular development by
   including multiple as-it-were secondary schema documents;

2) Whenever reference is made to names in another namespace from a
   primary or secondary schema document, use an xs:import _without_ a
   schemaLocation attribute;

3) Create a driver schema document, whose target namespace is the
   namespace of the (most common) document element of instance
   documents in the language.  It should contain an xs:include of the
   primary schema document for that namespace, and xs:imports for all
   the other namespaces, _with_ schemaLocation attributes pointing to
   the primary schema documents for those other namespaces.

Then, by passing the location of the driver schema document to <a title="schema
validation" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/open_xsd_validation.html">schema
validation</a> <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml/editor/">tools</a> and/or by including an xsi:schemaLocation attribute
on the document element of instances to be validated which associates
the target namespace of the driver schema document with its location,
you will get the behaviour you need from all the tools/implementations
I am aware of.

Schematically, this looks like

               driver.xsd -- TNS = http://www.example.org/rootNS
                              /|\
                             / | \
                            /  |  \
                           /   |   \
                   xs:include  |    \
                   schemaLoc=  |     \
                        /      |      \
                       /   xs:import   \
                      /    NS=...NS2    \
                     /     schemaLoc=    \
                    /          |       xs:import
                   /           |       NS=...NS3
                  /            |       schemaLoc=
                 /             |             \
            primary1.xsd   primary2.xsd  primary3.xsd
            TNS=...rootNS   TNS=...NS2    TNS=...NS3    
                 / \                         /|\
                /   \                       / | \
               /     \                     /  |  \
              /       \                   /   |   \
        xs:import  xs:import             /    |    \
        NS=...NS2  NS=...NS3      xs:include  |     \
                                  schemaLoc=  |      \
                                       /      |       \
                                  3.1.xsd     |        \
                                          xs:include    \
                                          schemaLoc=     \
                                              |           \
                                          3.2.xsd          \
                                                     xs:include
                                                     schemaLoc=
                                                          |
                                                     3.3.xsd

- -- 
       Henry S. Thompson, School of Informatics, University of Edinburgh
                         Half-time member of W3C Team
      10 Crichton Street, Edinburgh EH8 9AB, SCOTLAND -- (44) 131 650-4440
                Fax: (44) 131 651-1426, e-mail: <a href="mailto:ht&#x40;&#0105;&#0110;&#0102;&#0046;&#0101;&#0100;&#0046;&#0097;&#0099;&#0046;&#0117;&#0107;?Subject=Re%3A%20Escalation%20mechanism%20for%20different%20interpretation%20of%20W3C%20XML-Schema%20specification%20%3F&amp;In-Reply-To=%253Cf5bk4z0wrii.fsf%40hildegard.inf.ed.ac.uk%253E&amp;References=%253Cf5bk4z0wrii.fsf%40hildegard.inf.ed.ac.uk%253E">ht&#x40;&#0105;&#0110;&#0102;&#0046;&#0101;&#0100;&#0046;&#0097;&#0099;&#0046;&#0117;&#0107;</a>
                       URL: http://www.ltg.ed.ac.uk/~ht/
[mail really from me _always_ has this .sig -- mail without it is forged spam]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)

iD8DBQFK0021kjnJixAXWBoRAmPMAJ9dLLKZsj+r2y/tUtIsJ/wAjuL0kQCfWwzT
LqnqG7FgzH5zwP3XMIrNsb4=
=vK80
-----END PGP SIGNATURE-----
</pre>
<span id="received"><dfn>Received on</dfn> Monday, 12 October 2009 15:40:18 GMT</span>
</div>
]]></content></entry><entry><title>[XML Schema 1.1] Two ways to create interleaved, any-order content  ... are they identical? </title><id>http://xsd.stylusstudio.com/2009Oct/post07002.htm</id><link rel="alternate" type="text/html" href="http://xsd.stylusstudio.com/2009Oct/post07002.htm" /><updated>2009-10-12T13:00:39Z</updated><content type="text/plain"><![CDATA[<pre id="body">
<a name="start27" accesskey="j" id="start27"></a>
Hi Folks,

Below are two ways to declare a &lt;<a title="Book" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_book.html">Book</a>&gt; element. 

Both versions use &lt;all&gt;, to permit the elements within &lt;Book&gt; to occur in any order. 

The first version uses an unbounded &lt;any&gt;. The second version uses interleaved open content. 

Are these two versions identical? If so, is there an advantage of one over the other? If they are not identical, how do they differ?

/Roger

 
VERSION #1

&lt;<a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema_editor.html">xs:element</a> name=&quot;Book&quot;&gt;
    &lt;xs:complexType&gt;
        &lt;xs:all&gt;
            &lt;xs:any maxOccurs=&quot;unbounded&quot; /&gt;
            &lt;xs:element name=&quot;Author&quot; type=&quot;xs:string&quot; /&gt;
            &lt;xs:element name=&quot;Title&quot; type=&quot;xs:string&quot; /&gt;
            &lt;xs:element name=&quot;Date&quot; type=&quot;xs:string&quot; /&gt;
            &lt;xs:element name=&quot;ISBN&quot; type=&quot;xs:string&quot;/&gt;
            &lt;xs:element name=&quot;<a title="Stylus Studio XML Publisher" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml/publisher.html">Publisher</a>&quot; type=&quot;xs:string&quot; /&gt;
        &lt;/xs:all&gt;
    &lt;/xs:complexType&gt;
&lt;/xs:element&gt;
 

VERSION #2

&lt;xs:element name=&quot;Book&quot;&gt;
    &lt;xs:complexType&gt;
        &lt;xs:openContent mode=&quot;interleave&quot;&gt;
            &lt;xs:any /&gt;
        &lt;/xs:openContent&gt;
        &lt;xs:all&gt;
            &lt;xs:element name=&quot;Title&quot; type=&quot;xs:string&quot;/&gt;
            &lt;xs:element name=&quot;Author&quot; type=&quot;xs:string&quot; /&gt;
            &lt;xs:element name=&quot;Date&quot; type=&quot;xs:string&quot;/&gt;
            &lt;xs:element name=&quot;ISBN&quot; type=&quot;xs:string&quot;/&gt;
            &lt;xs:element name=&quot;Publisher&quot; type=&quot;xs:string&quot;/&gt;
        &lt;/xs:all&gt;
    &lt;/xs:complexType&gt;
&lt;/xs:element&gt;
</pre>
<span id="received"><dfn>Received on</dfn> Monday, 12 October 2009 17:01:11 GMT</span>
</div>
]]></content></entry><entry><title>RE: xsd ambigious </title><id>http://xsd.stylusstudio.com/2009Oct/post04002.htm</id><link rel="alternate" type="text/html" href="http://xsd.stylusstudio.com/2009Oct/post04002.htm" /><updated>2009-10-09T11:05:50Z</updated><content type="text/plain"><![CDATA[<pre id="body">
<a name="start24" accesskey="j" id="start24"></a>Hi Pete,

Good point. That sounds like a good idea.

Cheers for that,
Andy 

-----Original Message-----
From: <a href="mailto:xmlschema-dev-request&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;?Subject=RE%3A%20xsd%20ambigious&amp;In-Reply-To=%253C282CDBCE38E0B84292AB394C0E7AC5373843A4F5%40DEFTHW99E25MSX.ww902.siemens.net%253E&amp;References=%253C282CDBCE38E0B84292AB394C0E7AC5373843A4F5%40DEFTHW99E25MSX.ww902.siemens.net%253E">xmlschema-dev-request&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;</a> [mailto:<a href="mailto:xmlschema-dev-request&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;?Subject=RE%3A%20xsd%20ambigious&amp;In-Reply-To=%253C282CDBCE38E0B84292AB394C0E7AC5373843A4F5%40DEFTHW99E25MSX.ww902.siemens.net%253E&amp;References=%253C282CDBCE38E0B84292AB394C0E7AC5373843A4F5%40DEFTHW99E25MSX.ww902.siemens.net%253E">xmlschema-dev-request&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;</a>] On Behalf Of Pete Cordell
Sent: 09 October 2009 10:03
To: Neill, Andrew
Cc: <a href="mailto:xmlschema-dev&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;?Subject=RE%3A%20xsd%20ambigious&amp;In-Reply-To=%253C282CDBCE38E0B84292AB394C0E7AC5373843A4F5%40DEFTHW99E25MSX.ww902.siemens.net%253E&amp;References=%253C282CDBCE38E0B84292AB394C0E7AC5373843A4F5%40DEFTHW99E25MSX.ww902.siemens.net%253E">xmlschema-dev&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;</a>
Subject: Re: <a title="xsd" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema.html">xsd</a> ambigious

Hi Andy,

In that case it might be more aesthetic to move the minOccurs to the outer 
xsd:choice so you get:

&lt;xsd:choice minOccurs=&quot;0&quot; maxOccurs=&quot;unbounded&quot;&gt;

Pete.
----- Original Message ----- 
From: &quot;Neill, Andrew&quot; &lt;<a href="mailto:andy.neill&#x40;&#0115;&#0105;&#0101;&#0109;&#0101;&#0110;&#0115;&#0046;&#0099;&#0111;&#0109;?Subject=RE%3A%20xsd%20ambigious&amp;In-Reply-To=%253C282CDBCE38E0B84292AB394C0E7AC5373843A4F5%40DEFTHW99E25MSX.ww902.siemens.net%253E&amp;References=%253C282CDBCE38E0B84292AB394C0E7AC5373843A4F5%40DEFTHW99E25MSX.ww902.siemens.net%253E">andy.neill&#x40;&#0115;&#0105;&#0101;&#0109;&#0101;&#0110;&#0115;&#0046;&#0099;&#0111;&#0109;</a>&gt;
To: &quot;Pete Cordell&quot; &lt;<a href="mailto:petexmldev&#x40;&#0099;&#0111;&#0100;&#0097;&#0108;&#0111;&#0103;&#0105;&#0099;&#0046;&#0099;&#0111;&#0109;?Subject=RE%3A%20xsd%20ambigious&amp;In-Reply-To=%253C282CDBCE38E0B84292AB394C0E7AC5373843A4F5%40DEFTHW99E25MSX.ww902.siemens.net%253E&amp;References=%253C282CDBCE38E0B84292AB394C0E7AC5373843A4F5%40DEFTHW99E25MSX.ww902.siemens.net%253E">petexmldev&#x40;&#0099;&#0111;&#0100;&#0097;&#0108;&#0111;&#0103;&#0105;&#0099;&#0046;&#0099;&#0111;&#0109;</a>&gt;
Cc: &lt;<a href="mailto:xmlschema-dev&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;?Subject=RE%3A%20xsd%20ambigious&amp;In-Reply-To=%253C282CDBCE38E0B84292AB394C0E7AC5373843A4F5%40DEFTHW99E25MSX.ww902.siemens.net%253E&amp;References=%253C282CDBCE38E0B84292AB394C0E7AC5373843A4F5%40DEFTHW99E25MSX.ww902.siemens.net%253E">xmlschema-dev&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;</a>&gt;
Sent: Friday, October 09, 2009 9:35 AM
Subject: RE: xsd ambigious



Hi Pete,

Thanks for that but I thought about it and although I wanted d to appear 
before e or f, it is possible to submit an <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_file_explorer.html">xml file</a> with none of these 
fields populated so I left it in there.

Cheers,
Andy

-----Original Message-----
From: Pete Cordell [mailto:<a href="mailto:petexmldev&#x40;&#0099;&#0111;&#0100;&#0097;&#0108;&#0111;&#0103;&#0105;&#0099;&#0046;&#0099;&#0111;&#0109;?Subject=RE%3A%20xsd%20ambigious&amp;In-Reply-To=%253C282CDBCE38E0B84292AB394C0E7AC5373843A4F5%40DEFTHW99E25MSX.ww902.siemens.net%253E&amp;References=%253C282CDBCE38E0B84292AB394C0E7AC5373843A4F5%40DEFTHW99E25MSX.ww902.siemens.net%253E">petexmldev&#x40;&#0099;&#0111;&#0100;&#0097;&#0108;&#0111;&#0103;&#0105;&#0099;&#0046;&#0099;&#0111;&#0109;</a>]
Sent: 09 October 2009 09:33
To: Neill, Andrew
Cc: <a href="mailto:xmlschema-dev&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;?Subject=RE%3A%20xsd%20ambigious&amp;In-Reply-To=%253C282CDBCE38E0B84292AB394C0E7AC5373843A4F5%40DEFTHW99E25MSX.ww902.siemens.net%253E&amp;References=%253C282CDBCE38E0B84292AB394C0E7AC5373843A4F5%40DEFTHW99E25MSX.ww902.siemens.net%253E">xmlschema-dev&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;</a>
Subject: Re: xsd ambigious

Hi Andy,

That's great.  Actually, I don't know whether you noticed already, but
looking at it again, I don't think the minOccurs=&quot;0&quot; on the xsd:sequence is
required.

HTH,

Pete.
----- Original Message ----- 
From: &quot;Neill, Andrew&quot; &lt;<a href="mailto:andy.neill&#x40;&#0115;&#0105;&#0101;&#0109;&#0101;&#0110;&#0115;&#0046;&#0099;&#0111;&#0109;?Subject=RE%3A%20xsd%20ambigious&amp;In-Reply-To=%253C282CDBCE38E0B84292AB394C0E7AC5373843A4F5%40DEFTHW99E25MSX.ww902.siemens.net%253E&amp;References=%253C282CDBCE38E0B84292AB394C0E7AC5373843A4F5%40DEFTHW99E25MSX.ww902.siemens.net%253E">andy.neill&#x40;&#0115;&#0105;&#0101;&#0109;&#0101;&#0110;&#0115;&#0046;&#0099;&#0111;&#0109;</a>&gt;
To: &quot;Pete Cordell&quot; &lt;<a href="mailto:petexmldev&#x40;&#0099;&#0111;&#0100;&#0097;&#0108;&#0111;&#0103;&#0105;&#0099;&#0046;&#0099;&#0111;&#0109;?Subject=RE%3A%20xsd%20ambigious&amp;In-Reply-To=%253C282CDBCE38E0B84292AB394C0E7AC5373843A4F5%40DEFTHW99E25MSX.ww902.siemens.net%253E&amp;References=%253C282CDBCE38E0B84292AB394C0E7AC5373843A4F5%40DEFTHW99E25MSX.ww902.siemens.net%253E">petexmldev&#x40;&#0099;&#0111;&#0100;&#0097;&#0108;&#0111;&#0103;&#0105;&#0099;&#0046;&#0099;&#0111;&#0109;</a>&gt;; &lt;<a href="mailto:xmlschema-dev&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;?Subject=RE%3A%20xsd%20ambigious&amp;In-Reply-To=%253C282CDBCE38E0B84292AB394C0E7AC5373843A4F5%40DEFTHW99E25MSX.ww902.siemens.net%253E&amp;References=%253C282CDBCE38E0B84292AB394C0E7AC5373843A4F5%40DEFTHW99E25MSX.ww902.siemens.net%253E">xmlschema-dev&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;</a>&gt;
Sent: Thursday, October 08, 2009 11:11 AM
Subject: RE: xsd ambigious



Hi Pete,

That works. I don't know how I missed that.

Many Thanks,
Andy

-----Original Message-----
From: Pete Cordell [mailto:<a href="mailto:petexmldev&#x40;&#0099;&#0111;&#0100;&#0097;&#0108;&#0111;&#0103;&#0105;&#0099;&#0046;&#0099;&#0111;&#0109;?Subject=RE%3A%20xsd%20ambigious&amp;In-Reply-To=%253C282CDBCE38E0B84292AB394C0E7AC5373843A4F5%40DEFTHW99E25MSX.ww902.siemens.net%253E&amp;References=%253C282CDBCE38E0B84292AB394C0E7AC5373843A4F5%40DEFTHW99E25MSX.ww902.siemens.net%253E">petexmldev&#x40;&#0099;&#0111;&#0100;&#0097;&#0108;&#0111;&#0103;&#0105;&#0099;&#0046;&#0099;&#0111;&#0109;</a>]
Sent: 08 October 2009 11:07
To: Neill, Andrew; <a href="mailto:xmlschema-dev&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;?Subject=RE%3A%20xsd%20ambigious&amp;In-Reply-To=%253C282CDBCE38E0B84292AB394C0E7AC5373843A4F5%40DEFTHW99E25MSX.ww902.siemens.net%253E&amp;References=%253C282CDBCE38E0B84292AB394C0E7AC5373843A4F5%40DEFTHW99E25MSX.ww902.siemens.net%253E">xmlschema-dev&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;</a>
Subject: Re: xsd ambigious

Hi Andy,

Does something like the following work?
    ...
   &lt;xsd:choice maxOccurs=&quot;unbounded&quot;&gt;
    &lt;xsd:element ref=&quot;a&quot; minOccurs=&quot;0&quot;/&gt;
    &lt;xsd:element ref=&quot;b&quot; minOccurs=&quot;0&quot;/&gt;
    &lt;xsd:element ref=&quot;c&quot; minOccurs=&quot;0&quot;/&gt;
    &lt;xsd:sequence minOccurs=&quot;0&quot;&gt;
        &lt;xsd:element ref=&quot;d&quot;/&gt;
        &lt;xsd:choice&gt;
            &lt;xsd:sequence&gt;
                 &lt;xsd:element ref=&quot;e&quot;/&gt;
                 &lt;xsd:element ref=&quot;f&quot; minOccurs=&quot;0&quot;/&gt;
            &lt;/xsd:sequence&gt;
            &lt;xsd:element ref=&quot;f&quot;/&gt;
        &lt;/xsd:choice&gt;
    &lt;/xsd:sequence&gt;
    ...

HTH,

Pete.
--
=============================================
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://codalogic.com/lmx/ or http://www.xml2cpp.com
for more info
=============================================

----- Original Message ----- 
From: &quot;Neill, Andrew&quot; &lt;<a href="mailto:andy.neill&#x40;&#0115;&#0105;&#0101;&#0109;&#0101;&#0110;&#0115;&#0046;&#0099;&#0111;&#0109;?Subject=RE%3A%20xsd%20ambigious&amp;In-Reply-To=%253C282CDBCE38E0B84292AB394C0E7AC5373843A4F5%40DEFTHW99E25MSX.ww902.siemens.net%253E&amp;References=%253C282CDBCE38E0B84292AB394C0E7AC5373843A4F5%40DEFTHW99E25MSX.ww902.siemens.net%253E">andy.neill&#x40;&#0115;&#0105;&#0101;&#0109;&#0101;&#0110;&#0115;&#0046;&#0099;&#0111;&#0109;</a>&gt;
To: &lt;<a href="mailto:xmlschema-dev&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;?Subject=RE%3A%20xsd%20ambigious&amp;In-Reply-To=%253C282CDBCE38E0B84292AB394C0E7AC5373843A4F5%40DEFTHW99E25MSX.ww902.siemens.net%253E&amp;References=%253C282CDBCE38E0B84292AB394C0E7AC5373843A4F5%40DEFTHW99E25MSX.ww902.siemens.net%253E">xmlschema-dev&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;</a>&gt;
Sent: Wednesday, October 07, 2009 5:10 PM
Subject: xsd ambigious


Can anyone help with this XSD please? It doesnt seem to work?
Essentially i want to ensure that if &quot;E&quot; or &quot;F&quot; are populated then &quot;D&quot; is
populated before them. The rest of the elements can appear in any order and
any amount of times.

&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;xsd:schema xmlns:xsd=&quot;http://www.w3.org/2001/XMLSchema&quot;&gt;
  &lt;xsd:element name=&quot;element&quot;&gt;
  &lt;xsd:complexType&gt;
   &lt;xsd:choice maxOccurs=&quot;unbounded&quot;&gt;
    &lt;xsd:element ref=&quot;a&quot; minOccurs=&quot;0&quot;/&gt;
    &lt;xsd:element ref=&quot;b&quot; minOccurs=&quot;0&quot;/&gt;
    &lt;xsd:element ref=&quot;c&quot; minOccurs=&quot;0&quot;/&gt;
    &lt;xsd:sequence&gt;
     &lt;xsd:element ref=&quot;d&quot;/&gt;
     &lt;xsd:element ref=&quot;e&quot;/&gt;
    &lt;/xsd:sequence&gt;
    &lt;xsd:sequence&gt;
     &lt;xsd:element ref=&quot;d&quot;/&gt;
     &lt;xsd:element ref=&quot;f&quot;/&gt;
    &lt;/xsd:sequence&gt;
   &lt;/xsd:choice&gt;
  &lt;/xsd:complexType&gt;
 &lt;/xsd:element&gt;
 &lt;xsd:element name=&quot;a&quot;/&gt;
 &lt;xsd:element name=&quot;b&quot;/&gt;
 &lt;xsd:element name=&quot;c&quot;/&gt;
 &lt;xsd:element name=&quot;d&quot;/&gt;
 &lt;xsd:element name=&quot;e&quot;/&gt;
 &lt;xsd:element name=&quot;f&quot;/&gt;
&lt;/xsd:schema&gt;

Many Thanks,
Andy
</pre>
<span id="received"><dfn>Received on</dfn> Friday,  9 October 2009 09:07:13 GMT</span>
</div>
]]></content></entry><entry><title>RE: xsd ambigious </title><id>http://xsd.stylusstudio.com/2009Oct/post02002.htm</id><link rel="alternate" type="text/html" href="http://xsd.stylusstudio.com/2009Oct/post02002.htm" /><updated>2009-10-09T10:35:50Z</updated><content type="text/plain"><![CDATA[<pre id="body">
<a name="start22" accesskey="j" id="start22"></a>Hi Pete,

Thanks for that but I thought about it and although I wanted d to appear before e or f, it is possible to submit an <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_file_explorer.html">xml file</a> with none of these fields populated so I left it in there.

Cheers,
Andy 

-----Original Message-----
From: Pete Cordell [mailto:<a href="mailto:petexmldev&#x40;&#0099;&#0111;&#0100;&#0097;&#0108;&#0111;&#0103;&#0105;&#0099;&#0046;&#0099;&#0111;&#0109;?Subject=RE%3A%20xsd%20ambigious&amp;In-Reply-To=%253C282CDBCE38E0B84292AB394C0E7AC5373843A4CA%40DEFTHW99E25MSX.ww902.siemens.net%253E&amp;References=%253C282CDBCE38E0B84292AB394C0E7AC5373843A4CA%40DEFTHW99E25MSX.ww902.siemens.net%253E">petexmldev&#x40;&#0099;&#0111;&#0100;&#0097;&#0108;&#0111;&#0103;&#0105;&#0099;&#0046;&#0099;&#0111;&#0109;</a>] 
Sent: 09 October 2009 09:33
To: Neill, Andrew
Cc: <a href="mailto:xmlschema-dev&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;?Subject=RE%3A%20xsd%20ambigious&amp;In-Reply-To=%253C282CDBCE38E0B84292AB394C0E7AC5373843A4CA%40DEFTHW99E25MSX.ww902.siemens.net%253E&amp;References=%253C282CDBCE38E0B84292AB394C0E7AC5373843A4CA%40DEFTHW99E25MSX.ww902.siemens.net%253E">xmlschema-dev&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;</a>
Subject: Re: <a title="xsd" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema.html">xsd</a> ambigious

Hi Andy,

That's great.  Actually, I don't know whether you noticed already, but 
looking at it again, I don't think the minOccurs=&quot;0&quot; on the <a title="xsd:sequence" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema_editor.html">xsd:sequence</a> is 
required.

HTH,

Pete.
----- Original Message ----- 
From: &quot;Neill, Andrew&quot; &lt;<a href="mailto:andy.neill&#x40;&#0115;&#0105;&#0101;&#0109;&#0101;&#0110;&#0115;&#0046;&#0099;&#0111;&#0109;?Subject=RE%3A%20xsd%20ambigious&amp;In-Reply-To=%253C282CDBCE38E0B84292AB394C0E7AC5373843A4CA%40DEFTHW99E25MSX.ww902.siemens.net%253E&amp;References=%253C282CDBCE38E0B84292AB394C0E7AC5373843A4CA%40DEFTHW99E25MSX.ww902.siemens.net%253E">andy.neill&#x40;&#0115;&#0105;&#0101;&#0109;&#0101;&#0110;&#0115;&#0046;&#0099;&#0111;&#0109;</a>&gt;
To: &quot;Pete Cordell&quot; &lt;<a href="mailto:petexmldev&#x40;&#0099;&#0111;&#0100;&#0097;&#0108;&#0111;&#0103;&#0105;&#0099;&#0046;&#0099;&#0111;&#0109;?Subject=RE%3A%20xsd%20ambigious&amp;In-Reply-To=%253C282CDBCE38E0B84292AB394C0E7AC5373843A4CA%40DEFTHW99E25MSX.ww902.siemens.net%253E&amp;References=%253C282CDBCE38E0B84292AB394C0E7AC5373843A4CA%40DEFTHW99E25MSX.ww902.siemens.net%253E">petexmldev&#x40;&#0099;&#0111;&#0100;&#0097;&#0108;&#0111;&#0103;&#0105;&#0099;&#0046;&#0099;&#0111;&#0109;</a>&gt;; &lt;<a href="mailto:xmlschema-dev&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;?Subject=RE%3A%20xsd%20ambigious&amp;In-Reply-To=%253C282CDBCE38E0B84292AB394C0E7AC5373843A4CA%40DEFTHW99E25MSX.ww902.siemens.net%253E&amp;References=%253C282CDBCE38E0B84292AB394C0E7AC5373843A4CA%40DEFTHW99E25MSX.ww902.siemens.net%253E">xmlschema-dev&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;</a>&gt;
Sent: Thursday, October 08, 2009 11:11 AM
Subject: RE: xsd ambigious



Hi Pete,

That works. I don't know how I missed that.

Many Thanks,
Andy

-----Original Message-----
From: Pete Cordell [mailto:<a href="mailto:petexmldev&#x40;&#0099;&#0111;&#0100;&#0097;&#0108;&#0111;&#0103;&#0105;&#0099;&#0046;&#0099;&#0111;&#0109;?Subject=RE%3A%20xsd%20ambigious&amp;In-Reply-To=%253C282CDBCE38E0B84292AB394C0E7AC5373843A4CA%40DEFTHW99E25MSX.ww902.siemens.net%253E&amp;References=%253C282CDBCE38E0B84292AB394C0E7AC5373843A4CA%40DEFTHW99E25MSX.ww902.siemens.net%253E">petexmldev&#x40;&#0099;&#0111;&#0100;&#0097;&#0108;&#0111;&#0103;&#0105;&#0099;&#0046;&#0099;&#0111;&#0109;</a>]
Sent: 08 October 2009 11:07
To: Neill, Andrew; <a href="mailto:xmlschema-dev&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;?Subject=RE%3A%20xsd%20ambigious&amp;In-Reply-To=%253C282CDBCE38E0B84292AB394C0E7AC5373843A4CA%40DEFTHW99E25MSX.ww902.siemens.net%253E&amp;References=%253C282CDBCE38E0B84292AB394C0E7AC5373843A4CA%40DEFTHW99E25MSX.ww902.siemens.net%253E">xmlschema-dev&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;</a>
Subject: Re: xsd ambigious

Hi Andy,

Does something like the following work?
    ...
   &lt;xsd:choice maxOccurs=&quot;unbounded&quot;&gt;
    &lt;xsd:element ref=&quot;a&quot; minOccurs=&quot;0&quot;/&gt;
    &lt;xsd:element ref=&quot;b&quot; minOccurs=&quot;0&quot;/&gt;
    &lt;xsd:element ref=&quot;c&quot; minOccurs=&quot;0&quot;/&gt;
    &lt;xsd:sequence minOccurs=&quot;0&quot;&gt;
        &lt;xsd:element ref=&quot;d&quot;/&gt;
        &lt;xsd:choice&gt;
            &lt;xsd:sequence&gt;
                 &lt;xsd:element ref=&quot;e&quot;/&gt;
                 &lt;xsd:element ref=&quot;f&quot; minOccurs=&quot;0&quot;/&gt;
            &lt;/xsd:sequence&gt;
            &lt;xsd:element ref=&quot;f&quot;/&gt;
        &lt;/xsd:choice&gt;
    &lt;/xsd:sequence&gt;
    ...

HTH,

Pete.
--
=============================================
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://codalogic.com/lmx/ or http://www.xml2cpp.com
for more info
=============================================

----- Original Message ----- 
From: &quot;Neill, Andrew&quot; &lt;<a href="mailto:andy.neill&#x40;&#0115;&#0105;&#0101;&#0109;&#0101;&#0110;&#0115;&#0046;&#0099;&#0111;&#0109;?Subject=RE%3A%20xsd%20ambigious&amp;In-Reply-To=%253C282CDBCE38E0B84292AB394C0E7AC5373843A4CA%40DEFTHW99E25MSX.ww902.siemens.net%253E&amp;References=%253C282CDBCE38E0B84292AB394C0E7AC5373843A4CA%40DEFTHW99E25MSX.ww902.siemens.net%253E">andy.neill&#x40;&#0115;&#0105;&#0101;&#0109;&#0101;&#0110;&#0115;&#0046;&#0099;&#0111;&#0109;</a>&gt;
To: &lt;<a href="mailto:xmlschema-dev&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;?Subject=RE%3A%20xsd%20ambigious&amp;In-Reply-To=%253C282CDBCE38E0B84292AB394C0E7AC5373843A4CA%40DEFTHW99E25MSX.ww902.siemens.net%253E&amp;References=%253C282CDBCE38E0B84292AB394C0E7AC5373843A4CA%40DEFTHW99E25MSX.ww902.siemens.net%253E">xmlschema-dev&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;</a>&gt;
Sent: Wednesday, October 07, 2009 5:10 PM
Subject: xsd ambigious


Can anyone help with this XSD please? It doesnt seem to work?
Essentially i want to ensure that if &quot;E&quot; or &quot;F&quot; are populated then &quot;D&quot; is
populated before them. The rest of the elements can appear in any order and
any amount of times.

&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;xsd:schema xmlns:xsd=&quot;http://www.w3.org/2001/XMLSchema&quot;&gt;
  &lt;xsd:element name=&quot;element&quot;&gt;
  &lt;xsd:complexType&gt;
   &lt;xsd:choice maxOccurs=&quot;unbounded&quot;&gt;
    &lt;xsd:element ref=&quot;a&quot; minOccurs=&quot;0&quot;/&gt;
    &lt;xsd:element ref=&quot;b&quot; minOccurs=&quot;0&quot;/&gt;
    &lt;xsd:element ref=&quot;c&quot; minOccurs=&quot;0&quot;/&gt;
    &lt;xsd:sequence&gt;
     &lt;xsd:element ref=&quot;d&quot;/&gt;
     &lt;xsd:element ref=&quot;e&quot;/&gt;
    &lt;/xsd:sequence&gt;
    &lt;xsd:sequence&gt;
     &lt;xsd:element ref=&quot;d&quot;/&gt;
     &lt;xsd:element ref=&quot;f&quot;/&gt;
    &lt;/xsd:sequence&gt;
   &lt;/xsd:choice&gt;
  &lt;/xsd:complexType&gt;
 &lt;/xsd:element&gt;
 &lt;xsd:element name=&quot;a&quot;/&gt;
 &lt;xsd:element name=&quot;b&quot;/&gt;
 &lt;xsd:element name=&quot;c&quot;/&gt;
 &lt;xsd:element name=&quot;d&quot;/&gt;
 &lt;xsd:element name=&quot;e&quot;/&gt;
 &lt;xsd:element name=&quot;f&quot;/&gt;
&lt;/xsd:schema&gt;

Many Thanks,
Andy
</pre>
<span id="received"><dfn>Received on</dfn> Friday,  9 October 2009 08:36:28 GMT</span>
</div>
]]></content></entry><entry><title>Re: xsd ambigious </title><id>http://xsd.stylusstudio.com/2009Oct/post03002.htm</id><link rel="alternate" type="text/html" href="http://xsd.stylusstudio.com/2009Oct/post03002.htm" /><updated>2009-10-09T10:02:46Z</updated><content type="text/plain"><![CDATA[<pre id="body">
<a name="start23" accesskey="j" id="start23"></a>Hi Andy,

In that case it might be more aesthetic to move the minOccurs to the outer 
<a title="xsd" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema.html">xsd</a>:choice so you get:

&lt;xsd:choice minOccurs=&quot;0&quot; maxOccurs=&quot;unbounded&quot;&gt;

Pete.
----- Original Message ----- 
From: &quot;Neill, Andrew&quot; &lt;<a href="mailto:andy.neill&#x40;&#0115;&#0105;&#0101;&#0109;&#0101;&#0110;&#0115;&#0046;&#0099;&#0111;&#0109;?Subject=Re%3A%20xsd%20ambigious&amp;In-Reply-To=%253C8AA0EF47FF0C409D8CDC3D913120739E%40Codalogic%253E&amp;References=%253C8AA0EF47FF0C409D8CDC3D913120739E%40Codalogic%253E">andy.neill&#x40;&#0115;&#0105;&#0101;&#0109;&#0101;&#0110;&#0115;&#0046;&#0099;&#0111;&#0109;</a>&gt;
To: &quot;Pete Cordell&quot; &lt;<a href="mailto:petexmldev&#x40;&#0099;&#0111;&#0100;&#0097;&#0108;&#0111;&#0103;&#0105;&#0099;&#0046;&#0099;&#0111;&#0109;?Subject=Re%3A%20xsd%20ambigious&amp;In-Reply-To=%253C8AA0EF47FF0C409D8CDC3D913120739E%40Codalogic%253E&amp;References=%253C8AA0EF47FF0C409D8CDC3D913120739E%40Codalogic%253E">petexmldev&#x40;&#0099;&#0111;&#0100;&#0097;&#0108;&#0111;&#0103;&#0105;&#0099;&#0046;&#0099;&#0111;&#0109;</a>&gt;
Cc: &lt;<a href="mailto:xmlschema-dev&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;?Subject=Re%3A%20xsd%20ambigious&amp;In-Reply-To=%253C8AA0EF47FF0C409D8CDC3D913120739E%40Codalogic%253E&amp;References=%253C8AA0EF47FF0C409D8CDC3D913120739E%40Codalogic%253E">xmlschema-dev&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;</a>&gt;
Sent: Friday, October 09, 2009 9:35 AM
Subject: RE: xsd ambigious



Hi Pete,

Thanks for that but I thought about it and although I wanted d to appear 
before e or f, it is possible to submit an <a title="learn more" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_file_explorer.html">xml file</a> with none of these 
fields populated so I left it in there.

Cheers,
Andy

-----Original Message-----
From: Pete Cordell [mailto:<a href="mailto:petexmldev&#x40;&#0099;&#0111;&#0100;&#0097;&#0108;&#0111;&#0103;&#0105;&#0099;&#0046;&#0099;&#0111;&#0109;?Subject=Re%3A%20xsd%20ambigious&amp;In-Reply-To=%253C8AA0EF47FF0C409D8CDC3D913120739E%40Codalogic%253E&amp;References=%253C8AA0EF47FF0C409D8CDC3D913120739E%40Codalogic%253E">petexmldev&#x40;&#0099;&#0111;&#0100;&#0097;&#0108;&#0111;&#0103;&#0105;&#0099;&#0046;&#0099;&#0111;&#0109;</a>]
Sent: 09 October 2009 09:33
To: Neill, Andrew
Cc: <a href="mailto:xmlschema-dev&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;?Subject=Re%3A%20xsd%20ambigious&amp;In-Reply-To=%253C8AA0EF47FF0C409D8CDC3D913120739E%40Codalogic%253E&amp;References=%253C8AA0EF47FF0C409D8CDC3D913120739E%40Codalogic%253E">xmlschema-dev&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;</a>
Subject: Re: xsd ambigious

Hi Andy,

That's great.  Actually, I don't know whether you noticed already, but
looking at it again, I don't think the minOccurs=&quot;0&quot; on the <a title="xsd:sequence" class="kwLink" onMouseOver="stm(Text[0],Style[0])" onMouseOut="htm()" href="http://www.stylusstudio.com/xml_schema_editor.html">xsd:sequence</a> is
required.

HTH,

Pete.
----- Original Message ----- 
From: &quot;Neill, Andrew&quot; &lt;<a href="mailto:andy.neill&#x40;&#0115;&#0105;&#0101;&#0109;&#0101;&#0110;&#0115;&#0046;&#0099;&#0111;&#0109;?Subject=Re%3A%20xsd%20ambigious&amp;In-Reply-To=%253C8AA0EF47FF0C409D8CDC3D913120739E%40Codalogic%253E&amp;References=%253C8AA0EF47FF0C409D8CDC3D913120739E%40Codalogic%253E">andy.neill&#x40;&#0115;&#0105;&#0101;&#0109;&#0101;&#0110;&#0115;&#0046;&#0099;&#0111;&#0109;</a>&gt;
To: &quot;Pete Cordell&quot; &lt;<a href="mailto:petexmldev&#x40;&#0099;&#0111;&#0100;&#0097;&#0108;&#0111;&#0103;&#0105;&#0099;&#0046;&#0099;&#0111;&#0109;?Subject=Re%3A%20xsd%20ambigious&amp;In-Reply-To=%253C8AA0EF47FF0C409D8CDC3D913120739E%40Codalogic%253E&amp;References=%253C8AA0EF47FF0C409D8CDC3D913120739E%40Codalogic%253E">petexmldev&#x40;&#0099;&#0111;&#0100;&#0097;&#0108;&#0111;&#0103;&#0105;&#0099;&#0046;&#0099;&#0111;&#0109;</a>&gt;; &lt;<a href="mailto:xmlschema-dev&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;?Subject=Re%3A%20xsd%20ambigious&amp;In-Reply-To=%253C8AA0EF47FF0C409D8CDC3D913120739E%40Codalogic%253E&amp;References=%253C8AA0EF47FF0C409D8CDC3D913120739E%40Codalogic%253E">xmlschema-dev&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;</a>&gt;
Sent: Thursday, October 08, 2009 11:11 AM
Subject: RE: xsd ambigious



Hi Pete,

That works. I don't know how I missed that.

Many Thanks,
Andy

-----Original Message-----
From: Pete Cordell [mailto:<a href="mailto:petexmldev&#x40;&#0099;&#0111;&#0100;&#0097;&#0108;&#0111;&#0103;&#0105;&#0099;&#0046;&#0099;&#0111;&#0109;?Subject=Re%3A%20xsd%20ambigious&amp;In-Reply-To=%253C8AA0EF47FF0C409D8CDC3D913120739E%40Codalogic%253E&amp;References=%253C8AA0EF47FF0C409D8CDC3D913120739E%40Codalogic%253E">petexmldev&#x40;&#0099;&#0111;&#0100;&#0097;&#0108;&#0111;&#0103;&#0105;&#0099;&#0046;&#0099;&#0111;&#0109;</a>]
Sent: 08 October 2009 11:07
To: Neill, Andrew; <a href="mailto:xmlschema-dev&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;?Subject=Re%3A%20xsd%20ambigious&amp;In-Reply-To=%253C8AA0EF47FF0C409D8CDC3D913120739E%40Codalogic%253E&amp;References=%253C8AA0EF47FF0C409D8CDC3D913120739E%40Codalogic%253E">xmlschema-dev&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;</a>
Subject: Re: xsd ambigious

Hi Andy,

Does something like the following work?
    ...
   &lt;xsd:choice maxOccurs=&quot;unbounded&quot;&gt;
    &lt;xsd:element ref=&quot;a&quot; minOccurs=&quot;0&quot;/&gt;
    &lt;xsd:element ref=&quot;b&quot; minOccurs=&quot;0&quot;/&gt;
    &lt;xsd:element ref=&quot;c&quot; minOccurs=&quot;0&quot;/&gt;
    &lt;xsd:sequence minOccurs=&quot;0&quot;&gt;
        &lt;xsd:element ref=&quot;d&quot;/&gt;
        &lt;xsd:choice&gt;
            &lt;xsd:sequence&gt;
                 &lt;xsd:element ref=&quot;e&quot;/&gt;
                 &lt;xsd:element ref=&quot;f&quot; minOccurs=&quot;0&quot;/&gt;
            &lt;/xsd:sequence&gt;
            &lt;xsd:element ref=&quot;f&quot;/&gt;
        &lt;/xsd:choice&gt;
    &lt;/xsd:sequence&gt;
    ...

HTH,

Pete.
--
=============================================
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://codalogic.com/lmx/ or http://www.xml2cpp.com
for more info
=============================================

----- Original Message ----- 
From: &quot;Neill, Andrew&quot; &lt;<a href="mailto:andy.neill&#x40;&#0115;&#0105;&#0101;&#0109;&#0101;&#0110;&#0115;&#0046;&#0099;&#0111;&#0109;?Subject=Re%3A%20xsd%20ambigious&amp;In-Reply-To=%253C8AA0EF47FF0C409D8CDC3D913120739E%40Codalogic%253E&amp;References=%253C8AA0EF47FF0C409D8CDC3D913120739E%40Codalogic%253E">andy.neill&#x40;&#0115;&#0105;&#0101;&#0109;&#0101;&#0110;&#0115;&#0046;&#0099;&#0111;&#0109;</a>&gt;
To: &lt;<a href="mailto:xmlschema-dev&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;?Subject=Re%3A%20xsd%20ambigious&amp;In-Reply-To=%253C8AA0EF47FF0C409D8CDC3D913120739E%40Codalogic%253E&amp;References=%253C8AA0EF47FF0C409D8CDC3D913120739E%40Codalogic%253E">xmlschema-dev&#x40;&#0119;&#0051;&#0046;&#0111;&#0114;&#0103;</a>&gt;
Sent: Wednesday, Octo