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/08/01 13:15:29 UTC
[Bug 2945] New: - Problem of getting of set of nodes: select="ancestor::myNode[@id='main']|ancestor::myNode[@id='aux']
PLEASE DO NOT REPLY TO THIS MESSAGE. TO FURTHER COMMENT
ON THE STATUS OF THIS BUG PLEASE FOLLOW THE LINK BELOW
AND USE THE ON-LINE APPLICATION. REPLYING TO THIS MESSAGE
DOES NOT UPDATE THE DATABASE, AND SO YOUR COMMENT WILL
BE LOST SOMEWHERE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=2945
*** shadow/2945 Wed Aug 1 04:15:28 2001
--- shadow/2945.tmp.19872 Wed Aug 1 04:15:29 2001
***************
*** 0 ****
--- 1,64 ----
+ +============================================================================+
+ | Problem of getting of set of nodes: select="ancestor::myNode[@id='main'] |
+ +----------------------------------------------------------------------------+
+ | Bug #: 2945 Product: XalanJ2 |
+ | Status: NEW Version: 2.2.x |
+ | Resolution: Platform: Other |
+ | Severity: Blocker OS/Version: Other |
+ | Priority: Other Component: Xalan |
+ +----------------------------------------------------------------------------+
+ | Assigned To: xalan-dev@xml.apache.org |
+ | Reported By: ilnar@newst.net |
+ | CC list: Cc: |
+ +----------------------------------------------------------------------------+
+ | URL: |
+ +============================================================================+
+ | DESCRIPTION |
+ example of XML data:
+
+ <myDoc>
+ <myNode id="tools">
+ <myItem>Item of tools</myItem>
+ </myNode>
+ <myNode id="main">
+ <myItem>Item of main</myItem>
+ </myNode>
+ <myNode id="aux">
+ <myItem>Item of aux</myItem>
+ </myNode>
+ </myDoc>
+
+
+ the XSL file:
+
+ <?xml version="1.0" encoding="UTF-8"?>
+ <xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:fo="http://www.w3.org/1999/XSL/Format">
+
+
+ <xsl:template match="/">
+ <xsl:apply-templates/>
+ </xsl:template>
+
+ <xsl:template match="myNode">
+ <xsl:apply-templates select="myItem"/>
+ </xsl:template>
+
+ <xsl:template match="myItem">
+ <xsl:variable name="nodeSet" select="ancestor::myNode[@id='main']
+ |ancestor::myNode[@id='aux']"/>
+ <xsl:if test="$nodeSet">
+ <!--
+ Here operation with obtained variable $nodeSet
+ -->
+ </xsl:if>
+ </xsl:template>
+
+
+ Problem:
+ operation
+ select="ancestor::myNode[@id='main']|ancestor::myNode[@id='aux']"
+ is not worked!!! Parse process not cause exception.
+
+ This operation worked in Xalan 2.1.0
\ No newline at end of file