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

Re: xml element naming

  • 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...>

xml element naming
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.

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.