Hi,
I am using dom4j to evaluate xpath expressions against xml documents.
And a few of these are based on schemas. I have been stuck with the
an xpath for quite some time. I have attached the testcase with the mail
as a zip file. It has a couple of scripts(batch scripts, i am afraid) for compiling
and running.

All I have been able to figure is that the path I am interested in lies in default
namespace. I have also read at some places that xpaths using default namespace
is a problem. Could any of you tell what's wrong here and how I can resolve this
issue.

A gist of my problem is as follows (details are in the zip file):
-------------------dataset.xml---------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<dataset schema-version="1.0r2" xmlns="http://www.elsevier.com/xml/schema/transport/journal-1.0/s100"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="http://www.elsevier.com/xml/schema/transport/journal-1.0/s100

s100.xsd">
  <dataset-unique-ids>
     <supplier-code>vtx</supplier-code>
     <supplier-dataset-id>J0002887</supplier-dataset-id>
     <timestamp>2003-06-10T11:40:00.000</timestamp>
  </dataset-unique-ids>
   .......
</dataset>
The referred xsd files are present in the zip file.

And I am interested in the xpath: /dataset/dataset-unique-ids/supplier-code


Pls Note: the batch scripts will have to be tweaked according to your environment.

Thanks a lot,
Gurdev

Attachment: testcase.zip
Description: Zip archive



Reply via email to