Re: Emulation of XSL's id() in DSSSL?

Subject: Re: Emulation of XSL's id() in DSSSL?
From: Ralf Kempkens <kempkens@xxxxxxxxxxx>
Date: Fri, 25 Feb 2000 16:16:37 +0100
Thank you Norman, but you haven't got my point;

In message <646-Fri25Feb2000082143-0500-ndw@xxxxxxxxxx>you write:
>/ Ralf Kempkens <kempkens@xxxxxxxxxxx> was heard to say:
>| In xsl, the id()-function automatically returns a nodeset, but in DSSSL ther
>e
>| is only 'process-element-by-id' which returns a single node.
>
>FWIW, if id() returns more than one node, you don't have a valid XML
>document. (It's well-formed, but not valid; IDs are required to be
>unique.)

Look at section 4.1 of the XPath-Spec. You can use the id()-function to 
resolve multiple references (seperated by space), thus
id("id1 id3 id5") returns a nodeset with the three nodes having id1, id3, and 
id5 as their id's.

>
>| (e.g. <node id="id7" references="id1 id2 id4 id9">...</node>)
>| 
>| Does anybody out there have a function handy, that will return the right
>| nodeset?
>
>(element-with-id 'value') will return the element that has ID 'value'.

That's just the problem. I want to support multiple references. So I need a 
scheme function that breaks up a string into a list, using space as separator.
But my Scheme knowledge doesn't go that far.


Regards

Ralf


 DSSSList info and archive:  http://www.mulberrytech.com/dsssl/dssslist


Current Thread