Project

Profile

Help

Bug #4419

closed

fn:normalize-unicode fails when DTD-based validation of source data is turned on

Added by Martin Latterner almost 5 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Internals
Sprint/Milestone:
-
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&#252;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:

Mu&#x308;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

random_valid_xml.xml (140 Bytes) random_valid_xml.xml source file Martin Latterner, 2020-01-07 14:07
xsl.xsl (281 Bytes) xsl.xsl xslt file Martin Latterner, 2020-01-07 14:16

Please register to edit this issue

Also available in: Atom PDF