OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: [xml-dev] xml element naming

[ Lists Home | Date Index | Thread Index ]

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@bah.com> 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@bah.com
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!?
The New Yahoo! Search - Faster. Easier. Bingo.



 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS