[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] looking for existing XSL code
** not sure how active is the XSL-LIST, so I'm posting here too, sorry! ** Dear XSLT experts, Are there any existing XSLT code out there to walk thru the schema tree and output the node number starting from the root element? Ex: <?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns:xs='http://www.w3.org/2001/XMLSchema'> <xs:element name="personnel"> <xs:complexType> <xs:sequence> <xs:element ref="person" minOccurs='1' maxOccurs='unbounded'/> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="person"> <xs:complexType> <xs:sequence> <xs:element ref="name"/> <xs:element ref="email" minOccurs='0' maxOccurs='unbounded'/> </xs:sequence> <xs:attribute name="id" type="xs:ID" use='required'/> <xs:simpleType> <xs:restriction base = "xs:string"> <xs:enumeration value="true"/> <xs:enumeration value="false"/> </xs:restriction> </xs:simpleType> </xs:attribute> <xs:attribute name="salary" type="xs:integer"/> </xs:complexType> </xs:element> <xs:element name="name"> <xs:complexType> <xs:all> <xs:element ref="family"/> <xs:element ref="given"/> </xs:all> </xs:complexType> </xs:element> <xs:element name="family" type='xs:string'/> <xs:element name="given" type='xs:string'/> <xs:element name="email" type='xs:string'/> </xs:schema> And my desire output would look something like: 1 personnel 1.1 person 1.1.1 name 1.1.1.1 family 1.1.1.2 given 1.1.2 email Any pointers would be greatly appreciated! --Wo
|
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
|