[xquery-talk] modules and context
Dave Pawson
dave.pawson at gmail.com
Fri Nov 18 15:48:21 PST 2005
I've written a function in a module,
and I'm getting the error
XPDY0002: Cannot select a node here: the context item is undefined
How do I ... pass in the / context of a document please,
or do I have to open it with doc('a.xml') again?
TIA
Module - failing - is below
xquery version "1.0";
module namespace dp ="urn:modul";
declare namespace db ="http://docbook.org/ns/docbook";
declare namespace rng = "http://relaxng.org/ns/structure/1.0" ;
declare function dp:gatts($attributes as xs:string)
{
for $att in //rng:define[@name=$attributes]
return
<att>{$att}</att>
};
--
Dave Pawson
XSLT XSL-FO FAQ.
http://www.dpawson.co.uk
More information about the talk
mailing list