Subject: Re: [xsl] self axis vs . From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx> Date: Fri, 06 Jun 2008 11:58:22 -0400 |
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...
Cheers, Wendell
====================================================================== Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx Mulberry Technologies, Inc. http://www.mulberrytech.com 17 West Jefferson Street Direct Phone: 301/315-9635 Suite 207 Phone: 301/315-9631 Rockville, MD 20850 Fax: 301/315-8285 ---------------------------------------------------------------------- Mulberry Technologies: A Consultancy Specializing in SGML and XML ======================================================================
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] self axis vs ., Mukul Gandhi | Thread | Re: [xsl] self axis vs ., Mukul Gandhi |
RE: [xsl] What's wrong with my code, Pankaj Chaturvedi | Date | RE: [xsl] two at a time, using a se, John Cavalieri |
Month |