Brilliant! That's exactly what I'm looking for.
I've popped some line breaks in to make it easier for the next developer,
tested it and am really happy with it:
<xsl:apply-templates select="//blog
[not($AuthorId) or (author_id = $AuthorId)]
[not($CategoryId) or (category_id = $CategoryId)]
"/>
Thanks so much for your help!
-----Original Message-----
From: Vyacheslav Sedov [mailto:vyacheslav(_dot_)sedov(_at_)gmail(_dot_)com]
Sent: 20 August 2009 14:46
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: Re: [xsl] Avoiding multiple "apply-templates" by creating one variable
for the clauses. Is it possible?
what about //blog[not($AuthorId) or (author_id =
$AuthorId)][not($CategoryId) or (category_id = $CategoryId)]
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--