Subject: RE: Avoiding multiple "apply-templates" by creating one variable for the clauses. Is it possible?
From: Kate Busch-Petersen <kate.busch-petersen@xxxxxxxxxxxxx>
Date: Thu, 20 Aug 2009 13:52:21 +0100
|
Thanks Andrew, that looks exactly like what I'm looking for, but I get a big
ole error:
Expected token ')', found ','.
//blog[author_id = ($AuthorId -->,<-- author_id)[1]][category_id = ($...
Any ideas?
I'm not sure what ($AuthorId, author_id) is meant to do?
K
-----Original Message-----
From: Andrew Welch [mailto:andrew.j.welch@xxxxxxxxx]
Sent: 20 August 2009 11:47
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re: Avoiding multiple "apply-templates" by creating one
variable for the clauses. Is it possible?
How about:
<xsl:apply-templates select="//blog[author_id = ($AuthorId,
author_id)[1]][category_id = ($CategoryId, category_id)[1]]"/>
...although there might be a nicer way. Even so, sometimes its better
to have more readable code spread over a few lines than one that takes
you a few goes to understand what it's doing :)
|