You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by bu...@apache.org on 2003/12/04 20:05:59 UTC

DO NOT REPLY [Bug 25222] New: - XALAN processing fails, if you want to use the "document()" function and open a xhtml file, that has a dtd header:

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25222>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25222

XALAN processing fails, if you want to use the "document()" function and open a xhtml file, that has a dtd header:

           Summary: XALAN processing fails, if you want to use the
                    "document()" function and open a xhtml file, that has a
                    dtd header:
           Product: XalanJ2
           Version: 2.4Dx
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: org.apache.xalan
        AssignedTo: xalan-dev@xml.apache.org
        ReportedBy: florian.saller@web.de


XALAN processing fails, if you want to use the "document()" function and open a 
xhtml file, that has a dtd header:

Java Error Message:
 at ; SystemID: file:///h:/PROJEKTE/Optimay/Sources/QMPROC~1/xml/BUG_XH~1.XSL; 
Line#: 4; Column#: 55

***************** Workaround **********************
If you delete the DTD header (<!DOCTYPE html...), the processing works fine 
(But you have to know it ;-)

***************** Reproduce bug *******************
You can reproduce this bug, if you execute this stylesheet:

<?xml version="1.0" encoding="utf-8"?> 
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" >
	<xsl:template match="/">
		<xsl:for-each select="document('Bug_XHTML.xhtml')"/>
	</xsl:template>
</xsl:stylesheet>

BUG_XHTML.xhtml is the following source:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Test</title>
</script>
</head>
<body>
</body>
</html>

You can take the following source as input XML:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<root>
</root>