Project

Profile

Help

Bug #1242

closed

Proc instr'n name can't contain a colon

Added by Anonymous about 22 years ago. Updated about 12 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
-
Category:
Internals
Sprint/Milestone:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Legacy ID:
sf-520948
Applies to branch:
Fix Committed on Branch:
Fixed in Maintenance Release:
Platforms:

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

source.html (9.56 KB) source.html Anonymous, 2002-02-21 12:48
transform.xsl (9.56 KB) transform.xsl Anonymous, 2002-02-21 12:49

Please register to edit this issue

Also available in: Atom PDF