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

Re: Source code formatting

Subject: Re: Source code formatting
From: "Jorge chocolate.camera@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 19 Aug 2020 14:06:50 -0000
Re:  Source code formatting
I feel by no means proficient in XSL but most of the times I need to recall a
variable I use <xsl: sequence select="$var"/>. Most of the times it has the
same effect as value-of, but when it doesnbt, itbs not the latter what I
expected. If I am not wrong, sequence returns the actual node, intact, while
value-of converts it text.


> El 19 ago 2020, a las 15:30, Willem Van Lishout willemvanlishout@xxxxxxxxx
<xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> escribiC3:
>
> o;?
> It does.
>
> I now see that the reason for its disappearance is that in my stylesheet, I
have following character mapping in my stylesheet:
> <xsl:output-character character="&#10;" string="&#10;"/>
>
> Which I need in order not to have literal newlines converted to an entity. I
guess I have to choose between one or the other.
>
> I'll have a look at the serializer to see if I can do something there, but
hints are welcome.
>
> Willem Van Lishout
> willemvanlishout@xxxxxxxxx
>
>
>
>> On Wed, Aug 19, 2020 at 3:09 PM Martin Honnen martin.honnen@xxxxxx
<xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:
>> Am 19.08.2020 um 15:02 schrieb Willem Van Lishout
>> willemvanlishout@xxxxxxxxx:
>>
>> > I'm having a little trouble with converting whitespace entities.
>> > This line:
>> >
>> > <xsl:variable name="nl" select="'&#10;'"/>
>> >
>> > Gets converted to:
>> >
>> > <xsl:variable name="nl" select="
>> > "/>
>> >
>> > Which causes the variable to be output as a space when I do
>> > <xsl:value-of select="$nl"/> (I suppose because it gets normalized again
>> > during parsing).
>> >
>> > I wonder what the best way is to solve this problem? It's not important
>> > what it looks like, but the stylesheet behavior should obviously not
>> > change. The formatting is done by an XSL stylesheet (which removes
>> > whitespace-only nodes), which uses the aforementioned patched Xerces
>> > parser and then uses a custom Saxon serializer to control output
>> > indentation and new line settings. Is this something I could configure
>> > in the serializer?
>>
>>
>> Does the normal Saxon serializer preserve the numeric character reference?
>>
>
> XSL-List info and archive
> EasyUnsubscribe (by email)

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.