Subject: Re: [xsl] I need to make sure that all namespace declarations get output to a particular element, not the document element From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx> Date: Thu, 22 Mar 2007 19:10:18 +0100 |
I did not mean that anything unexpected was happening there. I just wanted to make a point. Apparently, when you have an RLE like this:
<root> <elem xmlns:test="urn:test"> <bla> <test:xyz /> </bla> </elem> <root>
then, when serializing, Saxon leaves that RLE precisely as-is.
It does not move the namespace declaration to the first element that needs it,
neither does it move it up the tree to the root (like you, I don't expect it too). However, once you add this namespace to the xsl:stylesheet (with exclude-result-prefixes), it does seem to do some cleanup
and move the namespace declaration down the tree to the moment where it is first needed.
I think this extra level of control is nice and will help the OP.
I don't think that I am saying something that is different from what you or David says, I only add that Saxon leaves the namespace declaration where it is on any RLE, even when it is not needed directly on that very RLE (unless you put that namespace to the xsl:stylesheet and/or when you add exclude-result-prefixes)
Well, I was not the one in need of help, but thanks, it does clarify things.
-- 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 Aug'05 http://www.CraneSoftwrights.com/s/bc Legal business disclaimers: http://www.CraneSoftwrights.com/legal
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] I need to make sure that , David Carlisle | Thread | Re: [xsl] I need to make sure that , Abel Braaksma |
Re: [xsl] What's your visual metaph, Dimitre Novatchev | Date | [xsl] Templates for different kinds, Thomas Zastrow |
Month |