I'm having trouble understanding the following behavior. Without putting the
document under DLS, I have inserted include statements in a file that refer to
external files as follows:
Book element snippet:
<book fileID="03990_000_1-ne_000" uri="/scriptures/bofm/1-ne">
...
<xi:include href="1-ne/03990_000_1-ne_001.xml" parse="xml"/>
<xi:include href="1-ne/03990_000_1-ne_002.xml" parse="xml"/>
...
</book>
Contents of 03990_000_1-ne_001.xml:
<chapter fileID="03990_000_1-ne_001" uri="/scriptures/bofm/1-ne/1">
<referenceHeader>
<scriptureID book="1-ne" chapter="1"/>
...
</referenceHeader>
...
</chapter>
When I perform the following query, I am getting duplicate results in which
both the reference to the chapter and the document containing the actual
chapter element are returned:
<chapters>
{
for $chapter in doc()//chapter[referenceHeader/scriptureID/@book = "1-ne"]
return <chapter>{ xdmp:node-uri( $chapter ) }</chapter>
}
</chapters>
<chapters>
<chapter>1-ne/03990_000_1-ne_001.xml</chapter>
<chapter>http://lds.org/shared/gl/scriptures/eng/bofm/1-ne/03990_000_1-ne_001.xml</chapter>
<chapter>1-ne/03990_000_1-ne_002.xml</chapter>
<chapter>http://lds.org/shared/gl/scriptures/eng/bofm/1-ne/03990_000_1-ne_002.xml</chapter<http://lds.org/shared/gl/scriptures/eng/bofm/1-ne/03990_000_1-ne_002.xml%3c/chapter>>
...
</chapters>
I would have expected the query to return only actual chapter elements, not the
references. Am I mis-using or misunderstanding include statements?
NOTICE: This email message is for the sole use of the intended recipient(s)
and may contain confidential and privileged information. Any unauthorized
review, use, disclosure or distribution is prohibited. If you are not the
intended recipient, please contact the sender by reply email and destroy all
copies of the original message.
_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general