XPath query-master document w/external entity references
Posted: Thu Mar 17, 2005 7:39 am
Hello,
I use oXygen v.2.0.4, and I'm working with a large xml document that consists of one master document with references to numerous other documents (the sections). The master document declares the DTD and the external entities (the other sections documents). I want to run an XPath query on the master document to find a particular node that is in one of the section documents. oXygen will give me the correct result of the query in the Message Panel, but clicking the record in the result list does not take me to (highlight) that node in the editing panel. It does nothing--because the node I'm seeking is not in the master document but in one of the section documents, which are declared as external entities. Is there a way to make this work? If not, does this work in the newest version of oXygen?
I hope this makes sense. To illustrate, the master document contains:
...
<!ENTITY file1.1 SYSTEM "../Source Files/File1a.xml">
<!ENTITY file1.2 SYSTEM "../Source Files/File1b.xml">
...
<group>
<group>
<text>&file1.1;</text>
<text>&file1.2;</text>
...<!--end of master document-->
File1a.xml looks like:
<?xml version="1.0" encoding="UTF-8"?>
<body>
<div>
<p><name-to-find>me</name-to-find>
...
My XPath query to locate <name-to-find> looks like:
/group/group/text[1]/body/div/p/name-to-find
Is my query wrong? Instead of *text[1]*, is there some way to give a file path that would direct oXygen to the correct section document?
I couldn't find an answer in the User Guide or archives, and I'd appreciate any help.
Thanks,
Susan
I use oXygen v.2.0.4, and I'm working with a large xml document that consists of one master document with references to numerous other documents (the sections). The master document declares the DTD and the external entities (the other sections documents). I want to run an XPath query on the master document to find a particular node that is in one of the section documents. oXygen will give me the correct result of the query in the Message Panel, but clicking the record in the result list does not take me to (highlight) that node in the editing panel. It does nothing--because the node I'm seeking is not in the master document but in one of the section documents, which are declared as external entities. Is there a way to make this work? If not, does this work in the newest version of oXygen?
I hope this makes sense. To illustrate, the master document contains:
...
<!ENTITY file1.1 SYSTEM "../Source Files/File1a.xml">
<!ENTITY file1.2 SYSTEM "../Source Files/File1b.xml">
...
<group>
<group>
<text>&file1.1;</text>
<text>&file1.2;</text>
...<!--end of master document-->
File1a.xml looks like:
<?xml version="1.0" encoding="UTF-8"?>
<body>
<div>
<p><name-to-find>me</name-to-find>
...
My XPath query to locate <name-to-find> looks like:
/group/group/text[1]/body/div/p/name-to-find
Is my query wrong? Instead of *text[1]*, is there some way to give a file path that would direct oXygen to the correct section document?
I couldn't find an answer in the User Guide or archives, and I'd appreciate any help.
Thanks,
Susan