[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Problems matching end-of-line character

Subject: Re: [xsl] Problems matching end-of-line character
From: Kenneth Stephen <marvin.the.cynical.robot@xxxxxxxxx>
Date: Wed, 10 Aug 2005 17:43:07 -0500
xsl end of line
David,

    Thanks for the explanation. I've understood the reason for my
problems. I was wondering if you might be kind enough to explain the
terminology you used a bit more. Specifically whats the difference
between a character reference, and an entity reference?

Thanks,
Kenneth

On 8/10/05, David Carlisle <davidc@xxxxxxxxx> wrote:
>
> >     Why is the end-of-line in $var1 not visible?
>
> because you are searching for a space not a newline.
>
>                 <xsl:if
test="contains(exsl-common:node-set($var1)/a/text(),'&xa;')">
>
> does what you want.
>
> Most weeks someone on this list calls a numeric character reference an
> entity reference, and I moan that it isn't an entity reference. This is
> one of those times that makes a difference.
> Newlines in attribute values are normalised to space by an xml parser
> before xlslt starts, character references hide the newline so it doesn't
> get normalised, but entity expansion happens before normalisation, so
> your EOL expands tp a newline character (not a character reference)
> and then gets normalised to a space. So by the time xslt starts the
> second argument to your contains() function is a space.

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.