[xuriella-devel] Question concerning custom xpath functions returning node sets

David Lichteblau david at lichteblau.com
Sun May 20 18:03:59 UTC 2012


Quoting rm at tuxteam.de (rm at tuxteam.de):
> No, that's pretty much the same (api-wise) as dom:create-text-node ...).
> Well, for this special case I wouldn't need a document instance, so stp
> would be a workarround to be used in xpath functions. But it feels wrong
> to use a implementation-specific api for my task. And it stil won't be
> a general way to return node-sets of booleans or numbers.
> 
>  Thanks RalfD
> 
> P.S.: I think the issue here is that xpath view of xml documents isn't
> the same as xml/dom's ....

I'm actually not entirely certain how I would approach this task if it
came up in my code.

But I suspect I might use (or make up) my very own objects
(independently of dom or stp, suited to the needs of the application)
and define the appropriate methods on generic functions in the
xpath-protocol package to inform xpath about how to understand those
objects.  (This protocol is possibly as not well documented as it ought
to be, but is meant to be user-visible and supported.)


d.




More information about the xuriella-devel mailing list