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
Actions #1

Updated by Anonymous about 22 years ago

SourceForge user: christianhujer

Logged In: YES

user_id=465603

Annotation: The processing instructions are in the

external subset of the DTD.

Actions #2

Updated by Anonymous about 22 years ago

SourceForge user: christianhujer

Logged In: YES

user_id=465603

About Xalan I wanted to write:

Xalan (on the same system / configuration) does not have

this bug.

(Though today I've found another bug in Xalan)

Actions #3

Updated by Anonymous about 22 years ago

SourceForge user: mhkay

Logged In: YES

user_id=251681

Please don't enter bug reports directly into this register!

As clearly indicated on the front page, this register is

intended for confirmed bugs only, not for suspected bugs. I

usually delete such reports. In this case, however, I shall

leave it here because it is actually a bug.

In fact there seem to be two separate bugs here. The first

one is that processing instructions within the DTD should

be ignored: this isn't happening: I'll raise a separate

entry for that. The second is that Saxon is apparently

trying to resolve a processing instruction name containing

a colon as if it were a QName.

Mike Kay

Actions #4

Updated by Anonymous about 22 years ago

SourceForge user: mhkay

Logged In: YES

user_id=251681

XSLT requires that the source document be conformant with

the XML Namespaces recommendation. This means that colons

in namespace names are not allowed. I propose to fix this

bug by ensuring that an error is reported if the name

(target) of a processing instruction contains a colon.

Mike Kay

Please register to edit this issue

Also available in: Atom PDF