Bug #1242
closedProc instr'n name can't contain a colon
0%
Description
SourceForge user: christianhujer
The function processing-instruction() sometimes
throws an ArrayIndexOutOfBoundsException.
Description of how the problem arose: I am using
XHTML Basic for source documents and transform them
to XHTML 1.1. The DTD of XHTML Basic contains three
processing instructions:
I wanted to filter them out with an empty template
like this:
<xsl:template match="processing-instruction('doc')" />
<xsl:template
match="processing-instruction('IS10744')" />
so far so good, but when using
<xsl:template
match="processing-instruction('IS10744:arch')" />
or
<xsl:template
match="processing-instruction('IS10744*')" />
I get an ArrayIndexOutOfBoundsException.
You may verify this with the following code snippets:
<head>
<title>Simple XHTML document</title>
</head>
<body>
<p>Some document</p>
</body>
<xsl:transform
version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transfor
m"
<!-- this works -->
<xsl:template
match="processing-instruction('doc')" />
<!-- this works -->
<xsl:template
match="processing-instruction('IS10744')" />
<!-- throws AIOOBException -->
<xsl:template
match="processing-instruction('IS10744:arch')" />
<!-- throws AIOOBException -->
<xsl:template
match="processing-instruction('IS10744*')" />
<!-- just copy the rest -->
<xsl:template match="@*|node()">
<xsl:copy>
<xsl:apply-templates
select="@*|node()"/>
</xsl:copy>
</xsl:template>
</xsl:transform>
I have found that version 6.5 and 6.5.1 running on
Linux using Java 2 SDK 1.4ß3 SE have this bug. I
don't know wether other versions of saxon / SDK / OS
will help to reproduce this bug.
Xalan (on the same system / configuration) does have
this bug.
I do not know wether this bug is a saxon bug or an
integration problem with AEfred or Java.
Files
Please register to edit this issue