OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]


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 &lt;tag&gt;
 </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 &lt;tag&gt;
 </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 &lt;tag&gt; which would be invalid

 </screen>

 <screen>
Another screen with a &lt;tag&gt;
 </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





[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]


Powered by eList eXpress LLC