GNOME Bugzilla – Bug 339576
Missing validation of QNames
Last modified: 2006-05-11 14:04:11 UTC
Example: The QNames specified by "cdata-section-elements" are not checked for being valid QNames; in xsltParseStylesheetOutput() only xsltGetQNameURI() is called, which does not catch the following cases: 1) ":" 2) "foo:bar:boo" Either we should enhance xsltGetQNameURI() to check for validity or we should validate the value before passing to xsltGetQNameURI(). "qnames.xsl" ------------ <?xml version='1.0'?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:foo="urn:test:foo"> <xsl:output cdata-section-elements=": foo:bar:boo"/> <xsl:template match="/"> <foo/> </xsl:template> </xsl:stylesheet> xsltproc qnames.xsl ..\test.xml <?xml version="1.0"?> <foo xmlns:foo="urn:test:foo"/>
Fixed in CVS, xslt.c, revision 1.127. We are using now validating the QName beforehand with xmlValidateQName().