xpointer

Trying to use XInclude with Java and resolving the fragment with xml:id

a 夏天 提交于 2020-01-24 20:00:12
问题 I've been trying to get XInclude working in my XML document and finally have it working in Oxygen XML, which I'm using to author the XML documents. I then went to my app, written in Java, but it doesn't seem to support any form of XPointer resolution except using something like: element(/1/2). This is, obviously, an awful scheme to have to use since every time the document is edited the XPointer needs changing to reflect the new position of the node in the XML! The scheme I had working simply

how to use xpointer to link to specific node from another document

半世苍凉 提交于 2019-12-13 02:25:33
问题 I have two xml files. and I want to refer the value of a node from the other xml file. example: 1.xml <?xml version="1.0"?> <catalog> <book id="bk101"> <author>Gambardella, Matthew</author> <title>XML Developer's Guide</title> <genre>Computer</genre> <price>44.95</price> <publish_date>2000-10-01</publish_date> <description>An in-depth look at creating applications with XML.</description> </book> <book id="bk102"> <author>Ralls, Kim</author> <title>Midnight Rain</title> <genre>Fantasy</genre>

How to use xpointer with Xinclude to reference elements

感情迁移 提交于 2019-12-10 13:23:25
问题 I want to merge 2 XML files with the same structure to make one. For example; Test1.xml <?xml version="1.0" encoding="UTF-8"?> <ns:Root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns="urn:TestNamespace" xsi:schemaLocation="urn:Test.Namespace Test1.xsd" > <ns:element1 id="001"> <ns:element2 id="001.1" order="1"> <ns:element3 id="001.1.1" /> </ns:element2> <ns:element2 id="001.2" order="2"> <ns:element3 id="001.1.2" /> </ns:element2> </ns:element1> </ns:Root> and Test2.xml <?xml