Update of /cvsroot/perl-xml/XML-LibXML-XPathContext
In directory sc8-pr-cvs1:/tmp/cvs-serv5116
Modified Files:
XPathContext.pm
Log Message:
Add documentation for lookupNs
Index: XPathContext.pm
===================================================================
RCS file: /cvsroot/perl-xml/XML-LibXML-XPathContext/XPathContext.pm,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -d -r1.28 -r1.29
--- XPathContext.pm 29 May 2003 14:28:29 -0000 1.28
+++ XPathContext.pm 25 Jul 2003 12:50:20 -0000 1.29
@@ -148,13 +148,15 @@
$xc->setContextNode($node);
$xc->registerNs($prefix, $namespace_uri);
+ $xc->unregisterNs($prefix);
+ my $namespace_uri = $xc->lookupNs($prefix);
+
$xc->registerFunction($name, sub { ... });
$xc->registerFunctionNS($name, $namespace_uri, sub { ... });
- $xc->registerVarLookupFunc(sub { ... }, $data);
-
- $xc->unregisterNs($prefix);
$xc->unregisterFunction($name);
$xc->unregisterFunctionNS($name, $namespace_uri);
+
+ $xc->registerVarLookupFunc(sub { ... }, $data);
$xc->unregisterVarLookupFunc($name);
my @nodes = $xc->findnodes($xpath);
@@ -166,8 +168,6 @@
my $value = $xc->findvalue($xpath);
my $value = $xc->findvalue($xpath, $context_node);
- my $namespace_uri = $xc->lookupNs($prefix);
-
=head1 DESCRIPTION
@@ -271,6 +271,11 @@
=item B<unregisterNs($prefix)>
Unregisters namespace I<$prefix>.
+
+=item B<lookupNs($prefix)>
+
+Returns namespace URI registered with I<$prefix>. If I<$prefix> is not
+registered to any namespace URI returns C<undef>.
=item B<registerVarLookupFunc($callback, $data)>
|