[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Collapsing run-on tag chains not working in saxon
> With the following xml and xsl, the Microsoft msxmldom 4 is producing > the expected output, but xalan 2.4, 2.6, and saxon 6.5.3 are not: they > all produce the same, unexpected output. actually, you could have skipped the rest of your message:-) mxsml has a "feature" that it "helpfully" removes white space text nodes from the input so they do not appear at all in the tree that xslt works on. If you are calling it from an API you can set the preservewhitespace property (with some capitals somewhere) so that this does not happen. You have white space indenting your elements and you usse following-sibling::node() so when you go <xsl:if test="not(local-name(preceding-sibling::node()[1])='ilink')"> on a conformant processor the following sibling is a text node, so doesn't have a name and your test does what you called "unexpexted" output bu to fix this use ::* not ::node() so you are only looking for elements or use xsl:strip-space elements="*" (or just elements="ilink" ) so that white space nodes are ignored. Then you'll get the same results everywhere (untested) David ________________________________________________________________________ This e-mail has been scanned for all viruses by Star. The service is powered by MessageLabs. For more information on a proactive anti-virus service working around the clock, around the globe, visit: http://www.star.net.uk ________________________________________________________________________
|
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
|