[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

Subject: Re: Collapsing run-on tag chains not working in saxon or xalan
From: David Carlisle <davidc@xxxxxxxxx>
Date: Mon, 1 Nov 2004 21:01:55 GMT
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
________________________________________________________________________

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.