[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: combination of copy-of and apply-templates

Subject: Re: combination of copy-of and apply-templates
From: Florent Georges <darkman_spam@xxxxxxxx>
Date: Wed, 22 Nov 2006 14:49:59 +0100 (CET)
copy of apply templates combination
Nico Van Cleemput wrote:

> Nevermind, I already found what I was doing wrong:

>      <xsl:template match="myhtml">
>          <xsl:apply-templates select="child::node()"/>
>      </xsl:template>

  Yes, you got it.  xsl:copy does a shallow copy of the context node
(it is like a deep copy, but for the elements an empty element of the
same name is created).  So if you don't want to copy the node, don't
use xsl:copy.

  child:: is the default axis, so in general child::node() is simply
written as node().  Matter of taste.

>      <xsl:template match="//mytag">
>          blabla
>      </xsl:template>

  The descendant axis is not required at the beginning of a pattern. 
It sounds more like obfuscation, I think.  match="mytag" does the same
thing.

  Regards,

--drkm





















	

	
		
___________________________________________________________________________ 
Dicouvrez une nouvelle fagon d'obtenir des riponses ` toutes vos questions ! 
Profitez des connaissances, des opinions et des expiriences des internautes sur Yahoo! Questions/Riponses 
http://fr.answers.yahoo.com

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.