This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

copying source tree with suttle changes


I used Oliver Becker's example to copy the source, excepting
minor changes in the company/office node as follows:

test.xsl ------->
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
version="1.0">
<xsl:template match="@*|node()">
<xsl:copy>
  <xsl:apply-templates select="@*|node()"/>
</xsl:copy>
</xsl:template>

<xsl:template match="customer[office]">
  <office>
      office things
  </office>
<xsl:apply-templates select="*" />
</xsl:template>
</xsl:stylesheet>

test.xml ---->

<customer name="one"
        revenue="1000000000"
        employees="20000"
        contact-person="blah"
        contact-email="blah@blah.com" >
<office city="new_york"
        revenue="20000"
        rent="3000" />

<office city="london"
        revenue="30000"
        rent="2000" />
</customer>


output --->
office things

I was expecting the copy of the rest of the source tree excepting at
customer/office node.

Thanks!

Rosh

PS I use xalan 1.1




_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]