View Single Post
  #7 (permalink)  
Old November 18th, 2008, 12:42 PM
DKatSSA DKatSSA is offline
Registered User
 
Join Date: Nov 2008
Location: , , .
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Here is a simple example where I'm taking Java and Xalan out of the picture. I am using XML Notepad to do the transformation. Here is the XML:

     <AAA >
          <BBB ooo = "111" ppp = "222" >
               <CCC>c1 </CCC>
               <CCC>c2 </CCC>
           </BBB>
          <BBB ooo = "555" ppp = "666" >
               <DDD>d1 </DDD>
               <DDD>d2 </DDD>
           </BBB>
      </AAA>

XSL:

<xsl:stylesheet xmlns:xsl = "http://www.w3.org/1999/XSL/Transform" version = "1.0" >

<xsl:output method = "xml" indent = "yes" />

    <xsl:template match = "/" >

         <xsl:copy-of select = "//BBB" />

    </xsl:template>
</xsl:stylesheet>

I am expecting to see the node-set displayed (starting at BBB), but instead in the transformation window I get: c1 c2 d1 d2. This is the result I would expect using xsl:value-of. This is as simple as it gets, so I am wondering if perhaps I am not understanding what this function should be doing?

Reply With Quote