[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

Subject: weed out unused global reference in an xsd document
From: Tim Müller-Seydlitz <tms@xxxxxxxxxxxxxxxxxx>
Date: Fri, 05 Sep 2003 14:50:28 +0200
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


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