[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: I need to make sure that all namespace declaration
At 2007-03-22 15:08 +0100, Abel Braaksma wrote:
David Carlisle wrote:Not sure if the processor is allowed to, I think it is, to cleanup the namespaces the way it likes and instead put the namespace decl. to 'test:other-ns-now' element. Because your use of exclude-result-prefixes= has pruned the namespace node away from the <root> literal result element. If I read your words correctly, this should not be allowed to happen, but it does: What you see is precisely what I would expect. which means, imo, that the declaration for the 'http://www.xyz.com' namespace, which is put on the RLE 'elem' is moved to an descendant, False. The namespace node has been pruned away from the <root> element so does not require a declaration. The node cannot be pruned from a literal-result-element that needs it. Saxon places the namespace declaration where it needs it and not anywhere higher. This does not change the output in any way, except for the location of the namespace declaration. If I remove the exclude-result-prefixed, the namespace is put on 'root', Correct ... because you haven't pruned it off of that literal result element. I think David's assertion is still correct ... it cannot be moved "down" the tree ... the declaration is placed where there is a namespace node in the result tree and your examples of pruning or not pruning the namespace nodes impact on the presence of a namespace node on your <root> result element. I'm still wary of a processor moving the namespace declaration "up" the tree ... though not incorrect (assuming they haven't confused namespaces), I don't see how the result tree node has namespace nodes requiring declarations ... surely they are not moved up the tree. Why would a processor bother with the look-ahead to determine "future" use of namespace nodes? But he is correct to say that it is not incorrect. I hope this helps. . . . . . . . . . . Ken -- 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
|
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
|