[Home] [By Thread] [By Date] [Recent Entries]

  • To: xml-dev@l...
  • Subject: Re: xml element naming
  • From: chasee <chaseexmldb@y...>
  • Date: Mon, 2 Jun 2003 10:00:51 -0700 (PDT)
  • In-reply-to: <3ED9635F.721E86B3@b...>

thank you! I appreciate it. Then here's my question: in the following sample, semantically speaking, are the three "price" elements distinct (because they represent prices for the suit, the top and the trousers repectively), or they are actually the same element?
<schema>
...
<xs:element name="suit">
 <xs:complexType>
  <xs:sequence>
   <xs:element name="price" type="xs:double"/>
   <xs:element name="top">
    <xs:complextype>
     <xs:sequence>
      <xs:element name="price" type="xs:double"/>
      <xs:element name="fabric" type="xs:string"/>
     </xs:sequence>
    </xs:complexType>
   </xs:element>
   <xs:element name="trousers">
    <xs:complexType>
     <xs:element name="price" type="xs:double"/>
    <xs:complexType>
   <xs:element>
  </xs:sequence>
 </xs:complexType>
</element>
...
</schema>
 
regards,
Althea Chasee

Chiusano Joseph <chiusano_joseph@b...> wrote:
A.,

With XML Schema you may define 2 elements of the same name only if one
is global and the other local, or if both are local.

Hope that helps,
Joe Chiusano
Booz | Allen | Hamilton

chasee wrote:
>
> Hi,
>
> can anyone give an opinion on the following:
>
> I am using schema to define the xml document structure. Is it valid
> for several elements with the same name and type to appear in
> different places in the same document? One at the top level and
> others are children of elements at different levels. Are they the same
> elements at all?
>
> Thank you,
> A.
>
> ----------------------------------------------------------------------
> Do you Yahoo!?
> The New Yahoo! Search - Faster. Easier. Bingo.begin:vcard
n:Chiusano;Joseph
tel;work:(703) 902-6923
x-mozilla-html:FALSE
url:www.bah.com
org:Booz | Allen | Hamilton;IT Digital Strategies Team
adr:;;8283 Greensboro Drive;McLean;VA;22012;
version:2.1
email;internet:chiusano_joseph@b...
title:Senior Consultant
fn:Joseph M. Chiusano
end:vcard

-----------------------------------------------------------------
The xml-dev list is sponsored by XML.org , an
initiative of OASIS

The list archives are at http://lists.xml.org/archives/xml-dev/

To subscribe or unsubscribe from this list use the subscription
manager:


Do you Yahoo!?
http://us.rd.yahoo.com/search/mailsig/*http://search.yahoo.com - Faster. Easier. Bingo.
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member