This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
Re: [docbook-apps] Can I make a XSLT not resolve CDATA sections forprogramlisting?
- From: Taro Ikai <tikai at ABINITIO dot COM>
- To: Bob Stayton <bobs at sco dot com>
- Cc: docbook-apps at lists dot oasis-open dot org
- Date: Mon, 25 Aug 2003 13:17:35 -0400
- Subject: Re: [docbook-apps] Can I make a XSLT not resolve CDATA sections forprogramlisting?
> In general, an XSLT processor does not preserve
> CDATA section markup. There is one escape feature, though.
> Your only hope is to include this in a customization layer:
>
> <xsl:output cdata-section-elements="programlisting"/>
>
> And change the processing of programlisting to
> just copy out the programlisting element:
>
> <xsl:template match="programlisting">
> <xsl:copy-of select="."/>
> </xsl:template>
This is just what I needed. Thanks.
One additional wish is to let it produce:
<programlisting><![CDATA[int foo;
foo++;
]]></programlisting>
instead of:
<programlisting><![CDATA[
int foo;
foo++;
]]></programlisting>
Please note the lack of line break at the beginning of the CDATA section
in the earlier block.
Is there a way to do this?
Taro
---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org