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

Re: Finding the ID attribute of an XPath from XMLSchem

Subject: Re: Finding the ID attribute of an XPath from XMLSchema
From: mozer <xmlizer@xxxxxxxxx>
Date: Sun, 22 Jul 2007 13:37:07 +0200
Re:  Finding the ID attribute of an XPath from XMLSchem
On 7/21/07, v vijith <vvijith@xxxxxxxxx> wrote:
Below is a snippet from the XMLSchema

<xs:complexType name="nameType">
               <xs:sequence>
                       <xs:element minOccurs="0" ref="desig"/>
               </xs:sequence>
               <xs:attribute ref="dest" use="required"/>
               <xs:attribute ref="id"/>
               <xs:attribute ref="garageid"/>
               <xs:attributeGroup ref="xlink:XLINKATT1"/>
       </xs:complexType>
<xs:attribute name="id" type="xs:ID"/>

this means that in the XML, the nameType node can be identified by the
id attribute as xs:attribute name=id is mapped to XS:ID.

Likewise there can be many nodes in the XML that has ID associated to it.

<xml>
<root>
<somenode>
<nameType id="2" attrib2="34">text</nameType>
<nameType id="3" attrib2="34">text</nameType>
<nameType id="4" attrib2="34">text</nameType>
</somenode>
<anothernode attrib5="55"/>
</root>

Just a sidenote


"2", "3" and "4" are not valid ID values...

Xmlizer

Current Thread

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
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-2011 All Rights Reserved.