Re: Re: Output validation with XSLT 2.0
If I modify the example (as given in my blog post) as follows (with rest of the things remaining same), which seems more logical to me:
The above is a literal result element, and so has attached to it all ancestral namespace nodes that are not pruned through use of exclude-result-prefixes= ... just like any other literal result element.
<xsl:copy-of select="$temp1" validation="strict" /> <xsl:copy-of select="$temp2" validation="strict" /> </result> </xsl:template>
Because you didn't prune it.
To avoid this I have to do, exclude-result-prefixes="xs" on the xsl:stylesheet element.
Just like you would have to in order to prune extension namespace nodes off of literal result elements.
There is nothing special about the schema namespace that implies pruning. The XSLT namespace is implicitly pruned, except (it seems), when a namespace alias for XSLT is being used.
Anyway, unused namespace declarations are innocuous in the result, so this is only an aesthetic issue.
I hope this helps.
. . . . . . . . . . . . Ken
On 5/3/08, Mukul Gandhi <gandhi.mukul@xxxxxxxxx> wrote:
-- World-wide corporate, govt. & user group XML, XSL and UBL training RSS feeds: publicly-available developer resources and training G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (F:-0995) Male Cancer Awareness Nov'07 http://www.CraneSoftwrights.com/s/bc Legal business disclaimers: http://www.CraneSoftwrights.com/legal
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