cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yeb Havinga <yeb.havi...@ddnh.nl>
Subject Re: xsl question: copy of templates
Date Wed, 09 Aug 2000 17:30:43 GMT
Ok, you have to believe me that when I wrote this, I tried at least 100
different things, read my xml-book 200 times and went through all
mailing list archives.

Apparently this does the trick:
<xsl:template match="p">
   <xsl:copy>
     <xsl:copy-of select="@*"/>
     <xsl:apply-templates/>
   </xsl:copy>
</xsl:template>

Also, deleting all generated java code and restarting the servlet engine
helps. That must have been at least 80% of the failures.

With thanks to the xsl faq at
http://www.dpawson.freeserve.co.uk/xsl/xslfaq.html

Damn I feel like such a newbie!

Yeb Havinga wrote:
> 
> Hello,
> 
> Can anyone please tell me how I can copy a template like this one:
> 
> <p foo="bar">some tekst</p>
> 
> Using
> 
>   <xsl:template match="p">
>    <xsl:copy>
>     <xsl:apply-templates select="*|@*|text()"/>
>    </xsl:copy>
>   </xsl:template>
> 
> I get
> 
> <p>barsometekst</p>
> 
> Thanks!
> 
> -- Yeb
> --
> -- "Oh, very clever, Worf. Ate any good books lately ?" - Q
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org

-- Yeb
-- 
-- "Oh, very clever, Worf. Ate any good books lately ?" - Q

Mime
View raw message