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

Having trouble installing Oxygen? Got a bug to report? Post it all here.
oerkelchen
Posts: 1
Joined: Mon Oct 18, 2021 10:58 am

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

Post 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
Radu
Posts: 9434
Joined: Fri Jul 09, 2004 5:18 pm

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

Post 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
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply