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

RE: Finding the Undefined Elements

Subject: RE: Finding the Undefined Elements
From: "Andrew Welch" <ajwelch@xxxxxxxxxxxxxxx>
Date: Mon, 20 Jun 2005 10:09:15 +0100
xsl unmatched
> Greetings All,
>
> I am converting one format of XML to another XML by using XSL
> Transformation; I require the list of elements that I am not
> addressed in my XSL. Please advice.

One technique is to have a template:

<xsl:template match="*">
  <xsl:text/>Unmatched Element: <xsl:value-of select="local-name()"/>
  <xsl:apply-templates/>
</xsl:template>

This will then match any elements that would otherwise be handled by the
inbuilt 'default' template.

In order to find all elements without a matching template you would need
to ensure you only use the push technique, ie no xsl:for-each or
xsl:apply-templates select="...." so it's a little more involved than
just adding the above template.

cheers
andrew

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.