LISTSERV mailing list manager LISTSERV 15.5

Help for XML-L Archives

XML-L Archives

XML-L Archives


Next Message | Previous Message
Next in Topic | Previous in Topic
Next by Same Author | Previous by Same Author
Chronologically | Most Recent First
Proportional Font | Monospaced Font


Join or Leave XML-L
Reply | Post New Message
Search Archives

From: Bob Trasverso <[log in to unmask]>
Reply-To:[log in to unmask]
Date:Tue, 20 Nov 2001 12:26:45 -0000

text/plain (54 lines)

Hi all,

i have a problem to understand namespace in XPATH espression result, using
XALAN-J 2_2_D13
I have this little xml:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE Root [

<Root xmlns:foo="" xmlns="">
<Notaries xmlns="" Id="notaries">
<Notary name="Great, A. T." />
<Notary name="Hun, A. T." />

then i have this code snippet in Java,
after parsing, i have org.w3c.Document doc:

Node n = Doc.getElementById("notaries");
NodeList resultNodes = XPathAPI.selectNodeList(n,"(.//. | .//@*|.//namespace::*)");
if i print resultNodest i get:

i 0 Attribute xmlns:foo=
i 1 Attribute xmlns:xml=
i 2 Element Notaries
i 3 Attribute Id=notaries
i 4 Attribute xmlns=
i 5 Text
i 6 Element Notary
i 7 Attribute name=Great, A. T.
i 8 Text
i 9 Element Notary
i 10 Attribute name=Hun, A. T.
i 11 Text

That's all!!
But about namespace spec, the namespace name
foo= is not inherithed!!! It's not a defalut
namespace!!! e then then namespace whit prefix xml??? I have a few
doubts...If there is somebody that explains me this behaviour i'm happy.

Thans in advance


messaggio inviato con Freemail by superEva


Back to: Top of Message | Previous Page | Main XML-L Page



CataList Email List Search Powered by the LISTSERV Email List Manager