[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Re: Language Theorie concerning XML Schema (heavy, at leas


th orie x y z
Hi Bob,

Thanks for checking the example below.

I am afraid it was just used by ht to show some concept that I was
pondering and need not actually run to prove the point (it does
though, simply remove the type declaration in the elements x, y, z)

I moved the ensuing discussion to xmlschema-dev@w... by suggestion of ht.

Kind Regards,

Gregor

2005/4/28, Bob Foster <bob@o...>:
> Hmm. XercesJ reports three errors (not warnings) from this schema of the
> form:
> 
> Error - src-resolve: Cannot resolve the name 'unknownX' to a(n) 'type
> definition' component.
> 
> Where X is one of: 1, 2, 3;
> 
> Bob Foster
> 
> Henry S. Thompson wrote:
>  > I'll answer a simple question which I understand, and which I _think_
>  > is what you're asking.
>  >
>  > The following XML document is valid:
>  >
>  > <!DOCTYPE root [
>  > <!ELEMENT root (a|x)>
>  > <!ELEMENT a (b|y)>
>  > <!ELEMENT b (c|z)>
>  > <!ELEMENT c EMPTY>
>  > ]>
>  > <root><a><b><c/></b></a></root>
>  >
>  > Note it contains no declarations for the elements x, y and z.
>  >
>  > The corresponding schema document successfully validates the same
>  > instance:
>  >
>  > <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
>  >  <xs:element name="root">
>  >   <xs:complexType>
>  >    <xs:choice>
>  >     <xs:element ref="a"/>
>  >     <xs:element ref="x"/>
>  >    </xs:choice>
>  >   </xs:complexType>
>  >  </xs:element>
>  >
>  >  <xs:element name="a">
>  >   <xs:complexType>
>  >    <xs:choice>
>  >     <xs:element ref="b"/>
>  >     <xs:element ref="y"/>
>  >    </xs:choice>
>  >   </xs:complexType>
>  >  </xs:element>
>  >
>  >  <xs:element name="b">
>  >   <xs:complexType>
>  >    <xs:choice>
>  >     <xs:element ref="c"/>
>  >     <xs:element ref="z"/>
>  >    </xs:choice>
>  >   </xs:complexType>
>  >  </xs:element>
>  >
>  >  <xs:element name="c">
>  >   <xs:complexType/>
>  >  </xs:element>
>  >
>  >  <xs:element name="x" type="unknown1"/>
>  >  <xs:element name="y" type="unknown2"/>
>  >  <xs:element name="z" type="unknown3"/>
>  > </xs:schema>
>  >
>  > So yes, you can do incremental development of a schema for a complex
>  > XML language.
>  >
>  > ht
> 
> -----------------------------------------------------------------
> The xml-dev list is sponsored by XML.org <http://www.xml.org>, an
> initiative of OASIS <http://www.oasis-open.org>
> 
> The list archives are at http://lists.xml.org/archives/xml-dev/
> 
> To subscribe or unsubscribe from this list use the subscription
> manager: <http://www.oasis-open.org/mlmanage/index.php>
> 
>

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.