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

RE: xslt style

Subject: RE: xslt style
From: "Michael Kay" <michael.h.kay@xxxxxxxxxxxx>
Date: Fri, 10 Jan 2003 15:35:24 -0000
RE:  xslt style
> 
> Well, here is an example of what I think is a bad design:
> 
> <xsl:template match="person">
>   <xsl:call-template name="getName" />
> </xsl:template>
> 
> <xsl:template name="getName">
>   <xsl:value-of select="givenName" />
>   <xsl:text> </xsl:text>
>   <xsl:value-of select="familyName" />
> </xsl:template>
> 
> The getName template uses the context node at the point the 
> template was called in order to resolve the two paths 
> ("firstName" and "surname").
> 

Then you'll be pleased to hear that xsl:function in XSLT 2.0 won't allow
you to access the context node at the point the function was called -
you have to supply it as an explicit argument.

Michael Kay
Software AG
home: Michael.H.Kay@xxxxxxxxxxxx
work: Michael.Kay@xxxxxxxxxxxxxx 


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.