This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: avoiding repetition - more refined
- From: "Bryan Rasmussen" <bry at itnisk dot com>
- To: <xsl-list at lists dot mulberrytech dot com>
- Date: Tue, 12 Mar 2002 10:51:44 +0100
- Subject: RE: [xsl] avoiding repetition - more refined
- Keywords: xsltDEV
- Reply-to: xsl-list at lists dot mulberrytech dot com
it's sometimes hard to understand what you're going for, I sympathise cause
I have the same problem, let me see if I understand.
Inside of your DevelopmentRequirements element you have a with element that
has a string value, steve, and a sequence of DevelopmentJob elements with
different djid attributes.
the example you gave was
<DevelopmentRequirement drid="1">
....<with>steve</with>....</DevelopmentRequirement>
the drid attribute was incidental, that is to say you could have
<DevelopmentRequirement drid="7">
...<with>steve</with>...</DevelopmentRequirement> and want to match that.
It seems in that case that your best bet is to have a global parameter $name
that you check against DevelopmentRequirement,
like the following
<xsl:param name="name" select="'steve'"/>
<xsl:template match="calls">
<xsl:apply-templates select="DevelopmentRequirement[with = $name]"/>
</xsl:template>
then you'll have to send in the parameter name from you're application, I
suppose you're still using that hta you had way back when, so I know at any
rate that you have the code to do that part.
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list