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


Help: OASIS Mailing Lists Help | MarkMail Help



   looking for existing XSL code

[ Lists Home | Date Index | Thread Index ]

** 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?


<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs='http://www.w3.org/2001/XMLSchema'>

 <xs:element name="personnel">
     <xs:element ref="person" minOccurs='1' maxOccurs='unbounded'/>

 <xs:element name="person">
     <xs:element ref="name"/>
     <xs:element ref="email" minOccurs='0' maxOccurs='unbounded'/>
   <xs:attribute name="id"  type="xs:ID" use='required'/>
     <xs:restriction base = "xs:string">
       <xs:enumeration value="true"/>
       <xs:enumeration value="false"/>
   <xs:attribute name="salary" type="xs:integer"/>

 <xs:element name="name">
    <xs:element ref="family"/>
    <xs:element ref="given"/>

 <xs:element name="family" type='xs:string'/>
 <xs:element name="given" type='xs:string'/>
 <xs:element name="email" type='xs:string'/>


And my desire output would look something like:

1           personnel
1.1        person
1.1.1     name  family  given
1.1.2     email

Any pointers would be greatly appreciated!



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

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