RE: [xsl] keys and idrefs - XSLT2 request?

Subject: RE: [xsl] keys and idrefs - XSLT2 request?
From: DPawson@xxxxxxxxxxx
Date: Tue, 9 Oct 2001 14:14:29 +0100
xf:idref(string* $srcval) => node* Semantics
Returns the sequence of element nodes with an IDREF value matching the value
of one of the items in the sequence argument or an IDREFS value containing
an IDREF matching the value of one of the items in the sequence argument. If
the value of $srcval is a single string, it behaves as though a sequence of
length one of strings was supplied. This function allows reverse navigation
from IDs to IDREFs.

Thanks Jeni. 

Do you read this as working in this case? The last sentance appears to imply
Guessing that the sequence argument is the param to the function, this would
appear to
get all IDREF type 'pointers' to this id,

I'm unsure if it would resolve

<xf:for-each select = xf:idref ($this-node-id)>

where the 'pointers' were buried in the midst of an IDREFS type string.

<a idrefs=" x y z"/>
<b idrefs=" m n z"/>

<z id="z"/>

<template match="z"
<xf:for-each select = xf:idref (@id)>

Do you think this would find both a and b element nodes?
(assuming proper dtd definitions of id and idrefs)

> Another approach would be to use a tokenize() extension function to
> get the values against which the processes were keyed. This would work
> because when a node has a node set as a key value it is indexed by the
> values of all the nodes in the node set. So you could do something
> like:
> <xsl:key name="control"
>          match="process"
>          use="str:tokenize(@control)"/>
> And of course this would work whether you had access to the DTD or
> not.

that will do it Jeni (I'm starting to use saxon:tokenize (str, str) quite a
recently, very useful Mike, thanks. 
I'd not thought outside the box on this one.

Regards DaveP.

********* snip here **********


NOTICE: The information contained in this email and any attachments is 
confidential and may be legally privileged. If you are not the 
intended recipient you are hereby notified that you must not use, 
disclose, distribute, copy, print or rely on this email's content. If 
you are not the intended recipient, please notify the sender 
immediately and then delete the email and any attachments from your 

RNIB has made strenuous efforts to ensure that emails and any 
attachments generated by its staff are free from viruses. However, it 
cannot accept any responsibility for any viruses which are 
transmitted. We therefore recommend you scan all attachments.

Please note that the statements and views expressed in this email 
and any attachments are those of the author and do not necessarily 
represent those of RNIB.

RNIB Registered Charity Number: 226227


 XSL-List info and archive:

Current Thread