cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steven Noels <stev...@outerthought.org>
Subject Re: Cocoon reversing element attributes at output?
Date Sat, 28 Dec 2002 11:56:58 GMT
Anna Afonchenko wrote:

> I am writing xsl file that will catch some nodes (according given XPath) 
> and will output these nodes
> as a string.
> Here is the code snippet that outputs the matching node:
> <xsl:text>&lt;</xsl:text>
> <xsl:value-of select="concat(name(),' ')"/>
> <xsl:for-each select="@*">
>     <xsl:value-of select="name()"/>
>     <xsl:text>="</xsl:text>
>     <xsl:value-of select="."/>
>     <xsl:text>" </xsl:text>
> </xsl:for-each>
> <xsl:text>&gt;</xsl:text>
>  
> So, if, for example, the node <img src="some.gif" alt=""/> is caught, 
> then it will be output as is.

Also, consider the use of an identity template and xsl:copy for such tasks:

http://www.dpawson.co.uk/xsl/sect2/identity.html
http://www.dpawson.co.uk/xsl/sect2/N1930.html

</Steven>
-- 
Steven Noels                            http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
Read my weblog at              http://radio.weblogs.com/0103539/
stevenn at outerthought.org                stevenn at apache.org


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>


Mime
View raw message