Actions
Bug #4419
closedfn:normalize-unicode fails when DTD-based validation of source data is turned on
Start date:
2020-01-07
Due date:
% Done:
100%
Estimated time:
Legacy ID:
Applies to branch:
9.9, trunk
Fix Committed on Branch:
9.9, trunk
Fixed in Maintenance Release:
Platforms:
Description
Hello!
I am running Saxon-EE 9.9.1.4 on Java from the command line.
When I turn on DTD-based validation of source data (-dtd:on), then my stylesheet using fn:normalize-unicode fails.
Here is XSL to demonstrate the problem:
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="3.0">
<xsl:output encoding="ASCII" omit-xml-declaration="yes"/>
<xsl:template match="/">
<xsl:value-of select="normalize-unicode('Müller', 'NFKD')"/>
</xsl:template>
</xsl:stylesheet>
The source does not matter as long as it's XML that's valid against a DTD. For example:
<!DOCTYPE article SYSTEM "http://jats.nlm.nih.gov/archiving/1.2/JATS-archivearticle1.dtd">
<article><front><article-meta/></front></article>
When I run this with -dtd:off, I get the expected output:
Müller
When I switch -dtd:don, then the transformation fails:
Recoverable error on line 2 column 13 of normalizationData.xml:
SXXP0003: Error reported by XML parser: Document is invalid: no grammar found.
Recoverable error on line 2 column 13 of normalizationData.xml:
SXXP0003: Error reported by XML parser: Document root element "UnicodeData", must match
DOCTYPE root "null".
Error at char 18 in xsl:value-of/@select on line 7 column 68 of x.xsl:
The XML parser reported two validation errors
net.sf.saxon.trans.XPathException: The XML parser reported two validation errors
It seems to me I should be able to use fn:normalize-unicode with -dtd:on.
Files
Please register to edit this issue
Actions