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 2001/10/24 17:31:09 UTC
DO NOT REPLY [Bug 4397] New: -
xsltc fails to compile conflictres23 and node3 with xpath expression with processing-insruction step
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=4397>.
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=4397
xsltc fails to compile conflictres23 and node3 with xpath expression with processing-insruction step
Summary: xsltc fails to compile conflictres23 and node3 with
xpath expression with processing-insruction step
Product: XalanJ2
Version: 2.0.0
Platform: Sun
OS/Version: Solaris
Status: NEW
Severity: Blocker
Priority: Other
Component: org.apache.xalan.xsltc
AssignedTo: xalan-dev@xml.apache.org
ReportedBy: tom.amiro@sun.com
Running xalan on conflictres23
<?xml version="1.0" encoding="UTF-8"?>
<out>
Any-PI:a-pi
PI-named-b:some data
PI-by-content:b-pi
PI-by-content:c-pi
</out>
Running XSLTC with Xerces Parser on conflictres23
Compile errors:
Error parsing XPath expression 'processing-instruction('b-pi')[.='junk']'.
Error parsing XPath expression 'processing-instruction('b-pi')
conflictres23.xsl
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<!-- FileName: conflictres23 -->
<!-- Document: http://www.w3.org/TR/xslt -->
<!-- DocVersion: 19991116 -->
<!-- Section: 5.5 -->
<!-- Creator: David Marston -->
<!-- Purpose: Test for conflict resolution on processing-instruction() node
test. -->
<!-- should see 1 conflict warning, because presence of a predicate raises
priority to 0.5 -->
<xsl:template match="doc">
<out>
<xsl:apply-templates/>
</out>
</xsl:template>
<xsl:template match="processing-instruction('b-pi')[.='junk']">
<xsl:text>PI-by-name-and-content:</xsl:text><xsl:value-of select="name(.)"/>
</xsl:template>
<xsl:template match="processing-instruction()">
<xsl:text>Any-PI:</xsl:text><xsl:value-of select="name(.)"/>
</xsl:template>
<xsl:template match="processing-instruction()[.='junk']">
<xsl:text>PI-by-content:</xsl:text><xsl:value-of select="name(.)"/>
</xsl:template>
<xsl:template match="processing-instruction('b-pi')">
<xsl:text>PI-named-b:</xsl:text><xsl:value-of select="."/>
</xsl:template>
</xsl:stylesheet>
conflictres23.xml
<?xml version="1.0"?>
<doc>
<?a-pi some data?>
<?b-pi some data?>
<?b-pi junk?>
<?c-pi junk?>
node03
------
Running xalan on node03
<?xml version="1.0" encoding="UTF-8"?>
<out>Found-pi:a-pi<?a-pi some data?>Found-pi:a-pi<?a-pi some data?></out>
Running XSLTC with Xerces Parser on node03
Compile errors:
Error parsing XPath expression './processing-instruction('a-pi')'.
Error parsing XPath expression './processing-instruction('*')'.
Error parsing XPath expression 'processing-instruction('a-pi')'.
node03.xsl
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<!-- FileName: node03 -->
<!-- Document: http://www.w3.org/TR/xpath -->
<!-- DocVersion: 19991116 -->
<!-- Section: 2.3 -->
<!-- Creator: Paul Dick -->
<!-- Purpose: Test for processing-instruction() node test. -->
<!-- should say "Found-pi,,Found-pi" -->
<xsl:template match="/">
<out>
<xsl:apply-templates select="./processing-instruction('a-pi')"/>
<xsl:apply-templates select="./processing-instruction('*')"/>
<xsl:apply-templates select="./processing-instruction()"/>
</out>
</xsl:template>
<xsl:template match="processing-instruction('a-pi')">
<xsl:text>Found-pi:</xsl:text>
<xsl:value-of select="name()"/>
<xsl:copy/>
</xsl:template>
</xsl:stylesheet>
node03.xml
<?xml version="1.0"?>
<?a-pi some data?>
<doc>
<!-- This is a comment -->
test
</doc>