incubator-odf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ashok Hariharan <as...@parliaments.info>
Subject Accessing non ODF namespaces
Date Tue, 31 Jan 2012 07:19:32 GMT
Hello there --

I am using the RDF metadata provided by the ODF 1.2 specification in
my ODT documents to record metadata.

So the metadata gets captured in the rdf: namespace , and the metadata
entities and objects within it get captured in their own namespace.

My problem is I am unable to access the RDF metadata using ODFDOM XPath.

e.g. -- I access the RDF metadata file via OdfFileDom (i have it in
meta/meta.rdf )

then I try to access it via XPath --  "//rdf:Description" , I always
get a namespace error ...

If I set the namespace on the XPath object or If i set it globally on
OdfNamespace:

OdfNamespace.newNamespace("rdf","....");

I am still unable to access it ...

Note : if I access it without the namespace "//*[local-name() =
'Description'] , it works .

So whats the correct way to set foreign namespaces in ODFDOM ?

thanks ,

Ashok

Mime
View raw message