Re: crappy formatting with <xsl:text>

Jan Kotuc <[email protected]>
Newsgroups gmane.comp.gnome.lib.xslt
Message-ID <CACiQud65+=kLUN3RKCAM1Yd9KE_584d+OXXLvM5797pczaEmWA@mail.gmail.com>
I sort of gave up. Instead of my desired inclusion link, I have XSLT
produce a meaningless element <span class="replacement"/>, and then I
let "sed" run through the file and replace that element with
"&inclusion-link;".

Guaranteed to work like a charm on every Linux/Unix and gives me valid
and neatly-formatted XML DocBook file...

Jan

On 7/27/11, Jan Kotuc <[email protected]> wrote:
> Thanks, than is there a way to achieve the desired output without
> using the <xsl:text> element?
>
> Jan
>
> On 7/27/11, Nick Wellnhofer <[email protected]> wrote:
>> That's the way the indenting works in libxml2. As soon as an element
>> containing a text node is found, indenting is disabled for all the
>> contents of that element. So if you had something like the following,
>> everything should work as expected:
>>
>> <another-element>
>>      <xsl:text
>> disable-output-escaping="yes">&#38;some-link-name;</xsl:text>
>> </another-element>
>>
>> If the entity reference must be created inside the chapter element, then
>> I don't think there's a way to achieve indenting.
>>
>> Nick
>>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.