Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: [xsl] Collapsing run-on tag chains not working in saxon or xalan

From: David Carlisle <davidc@--------->
To:
Date: 11/1/2004 10:15:00 PM
> 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
________________________________________________________________________


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent