This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
Output escaping with xsltproc and profiling stylesheet
- From: Peter Kullmann <p dot kullmann at arenae dot ch>
- To: Docbook-Apps <docbook-apps at lists dot oasis-open dot org>
- Date: Tue, 12 Nov 2002 08:55:08 +0100
- Subject: DOCBOOK-APPS: Output escaping with xsltproc and profiling stylesheet
I have the following problem when profiling my docbook sources using
profile.xsl: xsltproc does not escape special characters like ">" in CDATA
sections.
An example (it's not valid docbook but it doesn't matter in this case):
test.xml
<?xml varsion="1.0"?>
<test>
<screen><![CDATA[
A CDATA section with a wrong <tag> which would be invalid
]]>
</screen>
<screen>
Another screen with a <tag>
</screen>
</test>
When profiling (i.e. xsltproc -o out.xml
path/to/stylesheets/profiling/profile.xsl test.xml) the following result is
generated:
<?xml version="1.0"?>
<!DOCTYPE test PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"http://www.oasis-open.org/docbook/xml/4.0/docbookx.dtd">
<test>
<screen>
A CDATA section with a wrong <tag> which would be invalid
</screen>
<screen>
Another screen with a <tag>
</screen>
</test>
This is no longer a valid xml instance.
When profiling with saxon the output is correct:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE test
PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"http://www.oasis-open.org/docbook/xml/4.0/docbookx.dtd">
<test>
<screen>
A CDATA section with a wrong <tag> which would be invalid
</screen>
<screen>
Another screen with a <tag>
</screen>
</test>
I.e. saxon does escape special characters also in CDATA sections.
Version info: I was using the following versions of xsltproc:
Using libxml 20423, libxslt 10013 and libexslt 705
xsltproc was compiled against libxml 20417, libxslt 10013 and libexslt 705
libxslt 10013 was compiled against libxml 20417
libexslt 705 was compiled against libxml 20417
or likewise
Using libxml 20423, libxslt 10019 and libexslt 710
xsltproc was compiled against libxml 20423, libxslt 10019 and libexslt 710
libxslt 10019 was compiled against libxml 20423
libexslt 710 was compiled against libxml 20423
I'm not quite sure whether this is a stylesheet bug or an xsltproc bug (I'm
pretty sure it's a bug, though). I can file a bug in either the xsltproc or
the docbook-xsl bugzilla when it's clear as to where it belongs.
Peter