Subject: Re: [xsl] self axis vs . From: "Vyacheslav Sedov" <vyacheslav.sedov@xxxxxxxxx> Date: Fri, 6 Jun 2008 17:11:03 +0400 |
i guess that <xsl:apply-templates select="self::elem" mode="other"/> is same as <xsl:if test="self::elem"><xsl:apply-templates select=".".... i prefer use <xsl:next-match/> instead <xsl:apply-templates select="." mode="...." On Fri, Jun 6, 2008 at 4:59 PM, Andrew Welch <andrew.j.welch@xxxxxxxxx> wrote: > An interesting practice I've come across at a client's site is instead > of using . they use self:: instead... > > So instead of: > > <xsl:apply-templates select="." mode="other"/> > > you have > > <xsl:apply-templates select="self::elem" mode="other"/> > > and instead of: > > .//whatever > > you have: > > self::elem//whatever > > While it seemed a little odd to start with, their argument of it helps > locate where you are (especially when . is far away from the match > pattern that's normally used to discover the current node) is > beginning to grow on me... > > > -- > Andrew Welch > http://andrewjwelch.com > Kernow: http://kernowforsaxon.sf.net/
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] self axis vs ., Andrew Welch | Thread | Re: [xsl] self axis vs ., Mukul Gandhi |
Re: [xsl] writing to file from MSXM, Christian Wittern | Date | Re: [xsl] self axis vs ., Mukul Gandhi |
Month |