|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Is this legal xpath usage?
Hi Patrick,
> I expect the external function jString:compareTo() to be
> called for each TRACK Element. It is called only once for the
> first TRACK.
>
> <xsl:template match="/" >
> <xsl:message>Filtering tracks earlier than
> <xsl:value-of select="$trimDate" /></xsl:message>
> <PRODUCT_LIST PACKAGER="DWS" >
> <xsl:apply-templates
> select="PRODUCT_LIST/PRODUCT[jString:compareTo($trimDate,
> rioport:formatDate(./PRODUCT_DETAILS/TRACK/LAST_UPDATE)) < 0]" />
> </PRODUCT_LIST>
> </xsl:template>
You're passing a node set consisting of all the LAST_UPDATE elements
to the rioport:formatDate() extension function. I have no idea how
that extension function works, but I suspect that it takes the first
node from that node set and returns a string, rather than formatting
all of them and returning a node set.
I think what you probably want is:
PRODUCT_LIST/PRODUCT
[PRODUCT_DETAILS/TRACK
[jString:compareTo($trimDate,
rioport:formatDate(LAST_UPDATE)) < 0]]
This applies templates to:
the PRODUCT elements that are children of the PRODUCT_LIST element
that is a child of the current node
where there is a TRACK element that is a child of the
PRODUCT_DETAILS element that is a child of the PRODUCT element
for which the result of comparing the $trimDate to the
formatted value of the LAST_UPDATE child of the TRACK element
is less than 0
I hope that helps,
Jeni
---
Jeni Tennison
http://www.jenitennison.com/
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








