[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Re: RE: Re: XPath riddle
hi all, with this schema <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"> <xsd:element name="C"> <xsd:complexType> <xsd:choice minOccurs="0" maxOccurs="unbounded"> <xsd:element name="V" type="B"/> <xsd:element name="W" type="A"/> </xsd:choice> </xsd:complexType> </xsd:element> <xsd:complexType name="B"> <xsd:sequence minOccurs="0" maxOccurs="unbounded"> <xsd:element name="E" type="A"/> </xsd:sequence> </xsd:complexType> <xsd:complexType name="A"> <xsd:sequence minOccurs="0" maxOccurs="unbounded"> <!-- RRR is causing confusion --> <xsd:element name="RRR"> <xsd:complexType> <xsd:sequence> <xsd:element name="V"> <xsd:complexType> <xsd:choice> <xsd:element name="E"/> </xsd:choice> </xsd:complexType> </xsd:element> </xsd:sequence> </xsd:complexType> </xsd:element> <xsd:element name="D" type="B"/> </xsd:sequence> </xsd:complexType> </xsd:schema> how would you select all Es of type A? Stating explicitly that RRR may not appear in the wanted Es ancestors would not do (I guess), because that would mean that partly identical paths should be identified beforehand etc. A possible XML instance could be this: <C> <W> <RRR> <D> <E> bar </E> </D> </RRR> <D> <E> <RRR> <D> <E> foo </E> </D> </RRR> <D> <E/> </D> </E> </D> </W> </C> regards, nikolas/ XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|