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/07/04 11:54:02 UTC

[Bug 2445] New: - Omitting nodes when more than one namespace is used

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=2445

*** shadow/2445	Wed Jul  4 02:54:02 2001
--- shadow/2445.tmp.18799	Wed Jul  4 02:54:02 2001
***************
*** 0 ****
--- 1,199 ----
+ +============================================================================+
+ | Omitting nodes when more than one namespace is used                        |
+ +----------------------------------------------------------------------------+
+ |        Bug #: 2445                        Product: XalanJ2                 |
+ |       Status: UNCONFIRMED                 Version: 2.2.x                   |
+ |   Resolution:                            Platform: PC                      |
+ |     Severity: Blocker                  OS/Version: Linux                   |
+ |     Priority: Other                     Component: org.apache.xalan.transf |
+ +----------------------------------------------------------------------------+
+ |  Assigned To: xalan-dev@xml.apache.org                                     |
+ |  Reported By: mkamp@codamax.com                                            |
+ |      CC list: Cc:                                                          |
+ +----------------------------------------------------------------------------+
+ |          URL:                                                              |
+ +============================================================================+
+ |                              DESCRIPTION                                   |
+ I got a stylesheet which is working alright, when Xalan is called from the
+ command line and when invoked from XSLT-process-mode (emacs).   When called from cocoon (TRAXTransformer) it is acting very strange. All output related to
+ "data" is omitted. I double checked a thousand times, that I am working with
+ the same files, but this is the case. The only difference between this
+ approaches is, that one is called with a static xml file from the command
+ line and the other is a transformer within Cocoon2.   Again, with cocoon every output related to data is omitted.
+  
+   When I remove the second namespace by hand it is working ok. Unfortunately I am not able to do this in my transformatin chain. 
+ 
+  Here is the stylesheet: 
+ <?xml version="1.0" encoding="ISO-8859-1"?>
+ <xsl:stylesheet version="1.0"
+   xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+   xmlns:cvis="http://www.codamax.com/vis" >
+   <xsl:output indent="yes" method="xml"/>
+  
+   <xsl:template match="cvis:report-definitions">
+     <xsl:element name="debug">
+       report-definitions called.
+     </xsl:element>
+     <xsl:apply-templates />
+   </xsl:template>   <xsl:template match="cvis:report">
+     <xsl:element name="debug">
+       report called.
+     </xsl:element>     <xsl:element name="html">       <!-- html document head -->       <xsl:element name="head">
+         <xsl:element name="title">
+           <xsl:value-of select="cvis:head/cvis:title"/>
+         </xsl:element>
+       </xsl:element>       <!-- html document body -->       <xsl:element name="body">
+          <!-- title line -->
+         <xsl:element name="h1">
+           <xsl:value-of select="cvis:head/cvis:title"/>
+         </xsl:element>         <xsl:element name="table">
+           <xsl:element name="tr">
+             <xsl:for-each select="cvis:head/cvis:column">
+               <xsl:element name="td">
+                 <xsl:value-of select="."/>
+               </xsl:element>                             <!-- td -->
+             </xsl:for-each>
+           </xsl:element>                                 <!-- tr   -->        
+                                    <!-- data -->
+          <xsl:apply-templates select="data"/>         </xsl:element>                                   <!-- table -->
+       </xsl:element>                                     <!-- body -->
+     </xsl:element>                                       <!-- html -->
+   </xsl:template>   <xsl:template match="data">
+     <xsl:element name="debug">
+       data called.
+     </xsl:element>
+     <xsl:apply-templates />
+   </xsl:template>   <xsl:template match="row|cvis:subtotal-row|cvis:total-row">
+      <xsl:element name="tr">
+        <xsl:apply-templates select="*"/>
+      </xsl:element>
+   </xsl:template>   <xsl:template match="row/*">
+     <xsl:element name="td">       <!-- total row -->
+       <xsl:if test="parent::total-row">
+         <xsl:element name="font">
+           <xsl:attribute name="size">+2</xsl:attribute>
+         </xsl:element>
+       </xsl:if>       <!-- subtotal row -->
+       <xsl:if test="parent::subtotal-row">
+         <xsl:element name="font">
+           <xsl:attribute name="size">+1</xsl:attribute>
+         </xsl:element>
+       </xsl:if>       <xsl:value-of select="."/>
+     </xsl:element>
+   </xsl:template>
+ </xsl:stylesheet> Here is the input: <?xml version="1.0" encoding="ISO-8859-1"?>
+ <cvis:report-definitions xmlns:cvis="http://www.codamax.com/vis">
+   <cvis:report name="pf">
+     <cvis:head>
+       <cvis:title>
+         PortfolioValuation
+       </cvis:title>
+       <cvis:column>
+         <cvis:caption>Land
+         </cvis:caption>
+         <cvis:dimension name="countries" attribute="name" grouped="yes"
+ sorting="ascending"/>
+       </cvis:column>
+       <cvis:column>
+         <cvis:caption>Tageswert
+         </cvis:caption>
+         <cvis:dimension name="securities" attribute="value" grouped="no"
+ sorting="ascending"/>
+       </cvis:column>
+     </cvis:head>
+   <data xmlns:sql="http://apache.org/cocoon/SQL/2.0">
+ <row>
+ <c1>AN</c1>
+ <c2>100.0</c2>
+ </row>
+ <row>
+ <c1>AT</c1>
+ <c2>100.0</c2>
+ </row>
+ <row>
+ <c1>AU</c1>
+ <c2>100.0</c2>
+ </row>
+ <row>
+ <c1>BE</c1>
+ <c2>100.0</c2>
+ </row>
+ <row>
+ <c1>CA</c1>
+ <c2>100.0</c2>
+ </row>
+ <row>
+ <c1>DE</c1>
+ <c2>100.0</c2>
+ </row>
+ <row>
+ <c1>DK</c1>
+ <c2>100.0</c2>
+ </row>
+ <row>
+ <c1>ES</c1>
+ <c2>100.0</c2>
+ </row>
+ <row>
+ <c1>FI</c1>
+ <c2>100.0</c2>
+ </row>
+ <row>
+ <c1>FR</c1>
+ <c2>100.0</c2>
+ </row>
+ <row>
+ <c1>GB</c1>
+ <c2>100.0</c2>
+ </row>
+ <row>
+ <c1>GR</c1>
+ <c2>100.0</c2>
+ </row>
+ <row>
+ <c1>IE</c1>
+ <c2>100.0</c2>
+ </row>
+ <row>
+ <c1>IT</c1>
+ <c2>100.0</c2>
+ </row>
+ <row>
+ <c1>JP</c1>
+ <c2>100.0</c2>
+ </row>
+ <row>
+ <c1>KY</c1>
+ <c2>100.0</c2>
+ </row>
+ <row>
+ <c1>LU</c1>
+ <c2>100.0</c2>
+ </row>
+ <row>
+ <c1>NL</c1>
+ <c2>100.0</c2>
+ </row>
+ <row>
+ <c1>NO</c1>
+ <c2>100.0</c2>
+ </row>
+ <row>
+ <c1>PT</c1>
+ <c2>100.0</c2>
+ </row>
+ <row>
+ <c1>SE</c1>
+ <c2>100.0</c2>
+ </row>
+ <row>
+ <c1>US</c1>
+ <c2>100.0</c2>
+ </row>
+ <row>
+ <c1>XX</c1>
+ <c2>100.0</c2>
+ </row>
+ </data>
+ </cvis:report>
+ </cvis:report-definitions>