I'm using Oxygen 9.3, mostly with the default parser, but also with Xsltproc. I have tried about 20 ways of putting fragment/entity/pointer information into an xi:include statement, all of them copied off of allegedly working examples on the web, with only 1 success. Using xi:include without xpointers or fragments works, but I get the whole document of course; and if I use "element(/1/1/1)", this works, but is fragile of course.
With fragments like 'href=1632.xml#/Metadata", I get "Fragment identifiers must not be used."
WIth xpointer="/", "/Metadata", "//", etc., I get: "InvalidShortHandPointer: The NCName of the ShortHand Pointer '/' is invalid."
My understanding is that xpointer supports XPath patterns, but apparently I'm not grokking how to do that correctly.
My included file is '1632.xml', as follows:
- Code: Select all
<Metadata xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ourschemalocation">
<Deployment>
<Device name="TestName" />
<output>more stuff</output>
</Deployment>
</Metadata>
My encompassing file is of the form
- Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<Metadata xsi:noNamespaceSchemaLocation="http://myschemalocation" >
<DataProducer name="2008.09.18">
<DataProducer name="Port Optode">
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="1632.xml" xpointer="/" >
<xi:fallback>
<Device name="ERROR: could not include data from 1632.xml" id="1632">
</Device>
</xi:fallback>
</xi:include>
</DataProducer>
</DataProducer>
</Metadata>





data server software 