From: Petr P. <pa...@us...> - 2003-03-26 11:47:37
|
Update of /cvsroot/perl-xml/XML-LibXML-XPathContext In directory sc8-pr-cvs1:/tmp/cvs-serv2833 Modified Files: XPathContext.pm Log Message: - minor POD corrections Index: XPathContext.pm =================================================================== RCS file: /cvsroot/perl-xml/XML-LibXML-XPathContext/XPathContext.pm,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- XPathContext.pm 25 Mar 2003 21:06:13 -0000 1.9 +++ XPathContext.pm 26 Mar 2003 11:47:32 -0000 1.10 @@ -203,11 +203,14 @@ variable ns-URI and must return one value: a number or string or any XML::LibXML object that can be a result of findnodes: Boolean, Literal, Number, Node (e.g. Document, Element, etc.), or NodeList. +For convenience, simple (non-blessed) array references containing only +XML::LibXML::Node objects can be used instead of a +XML::LibXML::NodeList. =item B<getVarLookupData()> -Returns the data associated with a variable lookup function during a -previous call to I<registerVarLookupFunc>. +Returns the data that have been associated with a variable lookup +function during a previous call to I<registerVarLookupFunc>. =item B<registerFunctionNS($name, $uri, $callback)> @@ -219,7 +222,9 @@ callback code must be a single value of the following types: a simple scalar (number,string) or an arbitrary XML::LibXML object that can be a result of findnodes: Boolean, Literal, Number, Node (e.g. Document, -Element, etc.), or NodeList. +Element, etc.), or NodeList. For convenience, simple (non-blessed) +array references containing only XML::LibXML::Node objects can be used +instead of a XML::LibXML::NodeList. =item B<registerFunction($name, $callback)> @@ -254,11 +259,11 @@ =item B<getContextNode()> -Get current context node. +Get the current context node. =item B<setContextNode($node)> -Set current context node. +Set the current context node. =back @@ -266,10 +271,10 @@ L<XML::LibXML::XPathContext> objects are not reentrant. It means you cannot register a Perl function with a L<XML::LibXML::XPathContext> -object if this Perl function uses itself same +object if this Perl function uses itself the same L<XML::LibXML::XPathContext> object internally. -For example following code will not work: +For example, the following code will not work: my $xc = XML::LibXML::XPathContext->new($node); $xc->registerFunction('func', sub { $xc->findvalue('1') }); |