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=2935

*** shadow/2935 Tue Jul 31 13:55:58 2001
--- shadow/2935.tmp.13331       Tue Jul 31 13:55:58 2001
***************
*** 0 ****
--- 1,108 ----
+ +============================================================================+
+ | xsltc fails conf test conditional14 on if with subelement                  |
+ +----------------------------------------------------------------------------+
+ |        Bug #: 2935                        Product: XalanJ2                 |
+ |       Status: NEW                         Version: CurrentCVS              |
+ |   Resolution:                            Platform: All                     |
+ |     Severity: Major                    OS/Version: All                     |
+ |     Priority: Other                     Component: org.apache.xalan.xsltc  |
+ +----------------------------------------------------------------------------+
+ |  Assigned To: [EMAIL PROTECTED]                                     |
+ |  Reported By: [EMAIL PROTECTED]                                          |
+ |      CC list: Cc:                                                          |
+ +----------------------------------------------------------------------------+
+ |          URL:                                                              |
+ +============================================================================+
+ |                              DESCRIPTION                                   |
+ XSLTC throws a runtime exception:
+ 
+ Exception in thread "main" java.lang.VerifyError: (class: conditional14, method:
+ applyTemplates signature:
+ 
+(Lorg/apache/xalan/xsltc/dom/DOMAdapter;Lorg/apache/xalan/xsltc/NodeIterator;Lorg/apache/xalan/xsltc/TransletOutputHandler;)V)
+ Expecting to find object/array on stack
+       at java.lang.Class.forName0(Native Method)
+       at java.lang.Class.forName(Class.java:120)
+       at
+ org.apache.xalan.xsltc.cmdline.Transform.doTransform(Transform.java:127)
+       at org.apache.xalan.xsltc.cmdline.Transform.main(Transform.java:294)
+ 
+ Expected Ouput (Saxon, XT, and Xalan agree)
+ ===========================================
+ <?xml version="1.0" encoding="UTF-8"?>
+ <out>Harry, he is 45 years old.
+ Tom, he is 30 years old.
+ Dick, he is 40 years old.
+ Paulette, she is 38 years old.
+ Peter, he is 34 years old.
+ </out>
+ 
+ XSL
+ ===
+ <?xml version="1.0"?>
+ <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; version="1.0">
+ 
+   <!-- FileName: conditional14 -->
+   <!-- Document: http://www.w3.org/TR/xslt -->
+   <!-- DocVersion: 19991116 -->
+   <!-- Section: 9.1 -->
+   <!-- Purpose: Test xsl:if with test of subelement value. -->
+ 
+ <xsl:template match="Family">
+   <out>
+     <xsl:apply-templates select="Child"/>
+   </out>
+ </xsl:template>
+ 
+ <xsl:template match="Child">
+   <xsl:if test='Personal_Information/Sex[.="Male"]' >
+     <xsl:value-of select="./Name" />, he is <xsl:value-of
+ select="Personal_Information/Age"/><xsl:text> years old.&#10;</xsl:text>
+   </xsl:if>
+   <xsl:if test='Personal_Information/Sex[.="Female"]' >
+     <xsl:value-of select="./Name" />, she is <xsl:value-of
+ select="Personal_Information/Age"/><xsl:text> years old.&#10;</xsl:text>
+   </xsl:if>
+ </xsl:template>
+ 
+ </xsl:stylesheet>
+ 
+ XML
+ ===
+ <?xml version="1.0"?>
+ <Family>
+ <Child>
+ <Name>Harry</Name>
+ <Personal_Information>
+ <Sex>Male</Sex>
+ <Age>45</Age>
+ </Personal_Information>
+ </Child>
+ <Child>
+ <Name>Tom</Name>
+ <Personal_Information>
+ <Sex>Male</Sex>
+ <Age>30</Age>
+ </Personal_Information>
+ </Child>
+ <Child>
+ <Name>Dick</Name>
+ <Personal_Information>
+ <Sex>Male</Sex>
+ <Age>40</Age>
+ </Personal_Information>
+ </Child>
+ <Child>
+ <Name>Paulette</Name>
+ <Personal_Information>
+ <Sex>Female</Sex>
+ <Age>38</Age>
+ </Personal_Information>
+ </Child>
+ <Child>
+ <Name>Peter</Name>
+ <Personal_Information>
+ <Sex>Male</Sex>
+ <Age>34</Age>
+ </Personal_Information>
+ </Child>
+ </Family>
\ No newline at end of file

Reply via email to