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 2002/07/10 12:59:26 UTC
DO NOT REPLY [Bug 10639] New: -
traversal of xml with namespaces not recognised in xsltc
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=10639>.
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=10639
traversal of xml with namespaces not recognised in xsltc
Summary: traversal of xml with namespaces not recognised in xsltc
Product: XalanJ2
Version: 2.3Dx
Platform: PC
OS/Version: Windows NT/2K
Status: NEW
Severity: Normal
Priority: Other
Component: org.apache.xalan.xsltc
AssignedTo: xalan-dev@xml.apache.org
ReportedBy: irene_hall@standardlife.com
I have an xslt application comprising xsl stylesheet, main xml file and two
additional xml files referenced via params in the xsl stylesheet. All these XML
files use namespaces. This transforms (using JAXP API) perfectly in xslt.
I have changed my JAXP API environment so that I am pointing at the xsltc
version of the transformer. Now the main xml file cannot be recognised by the
stylesheet. I can traverse through it using * . position() etc but I cannot
traverse it using named references ( I have tried both prefixed and non-
prefixed). The xml files that are picked up by params in the stylesheet are
traversed and referenced no problem.
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:js="javascript"
xmlns:ids2="http://www.standardlife.com/ids2"
xmlns:idstop="http://www.standardlife.com/idstop"
xmlns:idsnav="http://www.standardlife.com/idsnav"
xmlns="http://www.w3.org/1999/xhtml"
version="1.0">
<xsl:output encoding="iso-8859-1" method="xml" omit-xml-declaration="yes" media-
type="text/html" version="1.0" doctype-
system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" indent="yes"/>
<xsl:param name="lhmenus" select="/"/>
<xsl:param name="topbar" select="/"/>
<xsl:variable name="navigation" select="document($lhmenus)"/>
<xsl:variable name="top" select="document($topbar)"/>
*** All namepspace-prefixed references to the above variables work fine ***
<xsl:template match="/">
<html>
<head>
<title>
<xsl:value-of select="ids2:idspage/@title"/>
</title>
The above reference ids2:idspage/@title finds nothing. If I change it to
select="." and I can see the contents of the XML and I have tried various
positioning references - all of which work.
The xslt and xsltc versions use identical code other than the transformer.
I hope you can reproduce this.