cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Arno de Quaasteniet" <>
Subject Re: copy with attributes
Date Sun, 20 Feb 2000 13:30:16 GMT
RE: copy with attributesThis also works (at least for XT)

<xsl:for-each select="@*">

It's for you to decide if this is a more elegant way ;o)


----- Original Message ----- 
  From: Larry Blanchette 
  To: '' 
  Sent: Friday, February 18, 2000 11:59 PM
  Subject: RE: copy with attributes

  your running into the built in rule for the child nodes, you can circumvent this with mode

  <xsl:template match="@*|node()" mode="copy"> 
                  <xsl:apply-templates select="@*|node()" mode="copy"/> 

  <xsl:template match="table"> 
                  <xsl:apply-templates select="@*|node()" mode="copy"/> 

  maybe there is a more elegant solution but this should do the trick 


  -----Original Message----- 
  From: Duncan Werner [] 
  Sent: Friday, February 18, 2000 1:48 PM 
  To: Cocoon 
  Subject: xsl: copy with attributes 

  I'm having trouble using xsl:copy and preserving attributes. In the 
  following tempate, any attributes from the <table> tag will be dumped 
  out as text in the resulting page. I've looked in a few docs, and 
  I think I'm doing this right. If anyone has any insight, am I doing this 
  wrong, or is this behavior not supported in xalan? 

  <xsl:template match="table"> 
          <xsl:apply-templates select="@*"/> 

  duncan werner 

  To unsubscribe, e-mail: 
  For additional commands, e-mail: 

View raw message