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

RE: Namespace: what's the correct usage?

  • From: Jonathan Borden <jborden@m...>
  • To: Martin Gudgin <marting@d...>,Kohsuke KAWAGUCHI <kohsukekawaguchi@y...>, xml-dev@l...
  • Date: Sat, 19 May 2001 17:22:46 -0400

xs element usage
Martin Gudgin wrote:
>
> I left out the top-level element decl for conciseness. How's this;
>
> <xs:schema xmlns:xs='http://www.w3.org/2001/XMLSchema'
>            xmlns:this='urn:example.org.people'
>            targetNamespace='urn:example.org.people' >
>
>   <xs:complexType name='person' >
>     <xs:sequence>
>       <xs:element name='given' type='xs:string' />
>       <xs:element name='family' type='xs:string' />
>     </xs:sequence>
>   </xs:complexType>
>
>   <xs:element name='person' type='this:person' />
>
> </xs:schema>
>
> It's *both* an element and a complex type.
>
it gets very difficult to follow what is being said when the same name is
being used for two separate things, one an element and another a
complexType.

it seems to me that:

1) the "given" and "family" elements _are not_ locally scoped to the
"person" element.

this is completely akin to:

<!ENTITY % person.model "(given,family)">
<!ELEMENT given (#PCDATA)>
<!ELEMENT family (#PCDATA)>

<!ELEMENT person %person.model;>

in this case I can also do:

<!ELEMENT another.person %person.model;>

similarly

<xs:element name="another.person" type="this:person"/>

2) it also looks like all these elements are in the same namespace (as I
suggested).

-Jonathan





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.