[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Rename Some Node and attribute
Davide Antoni wrote:
But how to rename the node : RICHIESTA_PRESTAZIONI_EROGABILI into :ELENCO_PRESTAZIONI In much the same way, but the difference being that an attribute never has any children, but an element has. So in this case we have to re-apply the templates, like so (add this snippet to the previous one): <xsl:template match="RICHIESTA_PRESTAZIONI_EROGABILI"> <xsl:element name="ELENCO_PRESTAZIONI "> <xsl:apply-templates /> </xsl:element> </xsl:template> The fun thing about XSLT matching rules is: you provide a general rule that applies to everything, and you provide special rules for special cases. XSLT will automatically select the special rules when they are encountered up the tree, and applies the generic rules when no special rule is found for a specific node. Hope this helps, Cheers, -- Abel Braaksma http://www.nuntia.com
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|