[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: weed out unused global reference in an xsd documen

Subject: Re: weed out unused global reference in an xsd document
From: Tom Schutzer-Weissmann <xsl@xxxxxxxxxxxxxxxx>
Date: Fri, 5 Sep 2003 16:21:52 +0000
unused keys for sale
On Friday 05 Sep 2003 12:50, Tim Müller-Seydlitz wrote:
> 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?

Do an identity transform and add a template to soak up all the top-level 
xs:elements which aren't referenced elsewhere - you'll need a key to know if 
they are.
<xsl:key name="refs" match="@ref" use="."/>
...
<xsl:template match="xs:schema/xs:element[not(key('refs',@name))]"/>

regards,
Tom SW
--
"The facts are hideous, but we must face them" - Bertie Wooster


 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.