Page 1 of 1

Problem with <xi:include xpointer="xpointer(*)"/>

Posted: Mon Oct 18, 2021 11:12 am
by oerkelchen
Hello,

I must include all child elements of broot of b.xml:

a.xml:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<aroot 
   xmlns:xi="http://www.w3.org/2001/XInclude">  
   <xi:include href="b.xml" xpointer="id_broot"/>
   <xi:include href="b.xml" xpointer="xpointer(//broot/*)"/>
</aroot>
b.xml

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<broot 
   xml:id='id_broot'
   >  
   <child/>
   <child/>  
</broot>

Code: Select all

<xi:include href="b.xml" xpointer="id_broot"/>

-> includes the element broot, but I need the child-elements of broot.

Code: Select all

 <xi:include href="b.xml" xpointer="xpointer(//broot/*)"/>
-> SchemeUnsupported: The XPointer scheme 'xpointer' is not supported.
Related to this I found this topic: topic3107.html. So far so bad.

Has anybody an idea, how to solve it? Or a workaround?

Any help appreciated!
Thanks,
oerkelchen

Re: Problem with <xi:include xpointer="xpointer(*)"/>

Posted: Mon Oct 18, 2021 12:27 pm
by Radu
Hi,

I'm afraid I do not have a workaround for you, the Xerces parser used by Oxygen does not support such XPath constructs in the xpointer attribute value, you will probably need to assign an ID to each element and xi:include it separately.

Regards,
Radu