|
Subject: RE: [xsl] xslt style From: "Michael Kay" <michael.h.kay@xxxxxxxxxxxx> Date: Fri, 10 Jan 2003 15:35:24 -0000 |
>
> 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 |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: [xsl] xslt style, Jeni Tennison | Thread | Re: [xsl] xslt style, Jeni Tennison |
| Re: [xsl] Creating files, B. Tommie Usdin | Date | [xsl] Extreme Markup Languages 2003, B. Tommie Usdin |
| Month |