This is the mail archive of the docbook-apps@lists.oasis-open.org mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]