WS processing in an example on page 69
Hello,
In the section called "Contents of a Template Rule" in chapter 2 on page 69, there is an example with an extract from a stylesheet containing an <html> element and after that the text "The end". My first guess at how Saxon HE 9.2 would deal with the text, is that the text node is formed by the whitespaces before "The end" (carriage return + spaces or tabulation), the text itself and then the whitespaces after "The end" (carriage return). Thus we have a text node consisting not only of WS but also having regular characters. As such the text node will not be deleted, regardless of WS processing settings.
Indeed in the text, it is written that "(..) and some text («The end», preceded and followed by significant whitespace)". I understand this WS is significant.
When I execute the transformation the result includes "The end" with a carriage return before and after it but no spaces (or tabulation) before the text. I don't understand why. I thought all the WS that is included in the text node goes into the result tree.
By the way, when I execute the transformation with version set to 1.0 and with Xalan (an XSLT 1.0 processor), the result includes the spaces before "The end".
I would appreciate any clarification on this matter.
Thank in advance,
Ludovic Kuty
Last edited by lkuty; March 7th, 2011 at 04:36 AM..
|