Error message "Value of {cdata-section-elements} must be a list of QNames in '{uri}local' notation" when using Saxon 9

Having trouble installing <oXygen/>? Got a bug to report? Post it all here.
Martin Honnen
Posts: 56
Joined: Tue Aug 19, 2014 12:04 pm

Error message "Value of {cdata-section-elements} must be a list of QNames in '{uri}local' notation" when using Saxon 9

Post by Martin Honnen » Sun Jun 12, 2016 11:32 pm

When trying to run Saxon 9.6.0.7 HE with oXygen 18 against a stylesheet having

Code: Select all

	<xsl:output cdata-section-elements="MASTER_COMMENTS"/>
I get an error saying

Code: Select all

Description: Value of {cdata-section-elements} must be a list of QNames in '{uri}local' notation
I can't reproduce that problem using the same Saxon version with Java from the command line.

Here is the complete reduced test case:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">

<xsl:output cdata-section-elements="MASTER_COMMENTS"/>

<xsl:template match="@* | node()">
<xsl:copy>
<xsl:apply-templates select="@* | node()"/>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>
A sample input document is

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<MASTER_COMMENTS>
<![CDATA[<pre> Nice Work done </pre>]]>
</MASTER_COMMENTS>

alex_jitianu
Posts: 697
Joined: Wed Nov 16, 2005 11:11 am

Re: Error message "Value of {cdata-section-elements} must be a list of QNames in '{uri}local' notation" when using Saxon

Post by alex_jitianu » Tue Jun 14, 2016 11:51 am

Hello Martin,

Thank you for reporting this issue. I believe I've found the cause and it resides somewhere in Saxon's code. What happens is that Saxon parses the @cdata-section-elements as clark names obtaining: {}MASTER_COMMENTS. Later on, it does a validation of these clark notations and throws that exception. This validation is not performed when running Saxon from the command line and that's why you get the different behavior.

Unfortunately I haven't found a workaround so I've registered an issue and I'll let you know as soon as it gets fixed. We will probably contact Saxonica and ask for there advice on how to correctly address this problem.

Best regards,
Alex

sorin_carbunaru
Site Admin
Posts: 248
Joined: Mon May 09, 2016 9:37 am

Re: Error message "Value of {cdata-section-elements} must be a list of QNames in '{uri}local' notation" when using Saxon

Post by sorin_carbunaru » Fri Apr 07, 2017 2:55 pm

Hello Martin,

I wanted to let you know that the newly released oXygen 19.0 comes with Saxon 9.7.0.15, and the problem you reported has been solved.

Best wishes,
Sorin Carbunaru
oXygen XML

Post Reply