[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] weed out unused global reference in an xsd document
Hi,
I want to work on a xsd document. Where I want to weed out the global elements that are not referenced to anymore. How could I do it with xslt? Let me be a bit more specific. From a file that looks like this <?xml version="1.0" encoding="UTF-8"?> <xs:schema targetNamespace="http://www.you-know-who.com/2003/" xmlns="http://www.you-know-who.com/2003/" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified"> <xs:complexType name="Account"> <xs:sequence> <xs:element ref="bankCode" minOccurs="0"/> <xs:element ref="branchNumber" minOccurs="0"/> <xs:element ref="accountNumber" minOccurs="0"/> </xs:sequence> </xs:complexType> <xs:element name="account" type="Account"> </xs:element> <xs:element name="accountNumber" type="xs:string"> </xs:element> <xs:element name="bankCode" type="xs:string"/> <xs:element name="branchNumber" type="xs:string"> </xs:element> <xs:element name="currency" type="xs:string" /> </xs:schema> I want that <xs:element name="currency" type="xs:string" /> and all other unused references in a larger document do not appear in the output anymore. Apart from that the xsd shall remain unchanged Regards for your help. Tim 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
|