[Home] [By Thread] [By Date] [Recent Entries]

Subject: RE: copy-of question
From: "Michael Kay" <mhkay@xxxxxxxxxxxx>
Date: Thu, 19 Apr 2001 11:19:30 +0100
> how can I extract only one element in original form?
> copy-of seems to work here, but I have all the other unwanted
> tags also as
> plain text.
> Is this related to the default rules?
>
>   <xsl:template match="TABLE">
>     <xsl:copy-of select="."/
>   </xsl:template>
>

This is fine in itself, but it depends how you call it.

If you do

<xsl:template match="/">
  <xsl:apply-templates select="(//TABLE)[1]"/>
</xsl:template>

then your output will be a deep copy of the first TABLE element in the
source.

Mike Kay
Software AG


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


Current Thread
  • copy-of question
    • Franz Figl - Wed, 18 Apr 2001 15:37:00 -0400 (EDT)
      • Michael Kay - Thu, 19 Apr 2001 06:43:26 -0400 (EDT) <=
        • Franz Figl - Thu, 19 Apr 2001 13:03:52 -0400 (EDT)
      • <Possible follow-ups>
      • RSuiter - Wed, 18 Apr 2001 16:39:07 -0400 (EDT)
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member