Support XInclude 1.1
The XInclude spec says:
The fragid attribute is a generalization of the xpointer attribute. A fragid may be present regardless of the value of the parse attribute. The interpretation of the value of the attribute depends on the value of parse. For XML processing, the value is interpreted as an XPointer (see [XPointer Framework]); for text processing, it is interpreted as a [IETF RFC 5147] fragment identifier.
However if I have the documents: test-xi.xml
<?xml version="1.0" encoding="utf-8"?>
<domain xmlns:xi="http://www.w3.org/2001/XInclude">
<xi:include href="win11-vfio-devices.xml" fragid="xpointer(//devices)" parse="xml" />
</domain>
win11-vfio-devices.xml
<?xml version="1.0" encoding="utf-8"?>
<domain>
<devices>
<interface type="network">
<source network="default"/>
<model type="vfio" />
</interface>
</devices>
</domain>
and I run: xmllint --xinclude test-xi.xml
I get
<?xml version="1.0" encoding="utf-8"?>
<domain xmlns:xi="http://www.w3.org/2001/XInclude">
<domain>
<devices>
<interface type="network">
<source network="default"/>
<model type="vfio"/>
</interface>
</devices>
</domain>
</domain>
if I change the fragid attribute on the xi:include element to xpointer I get:
<?xml version="1.0" encoding="utf-8"?>
<domain xmlns:xi="http://www.w3.org/2001/XInclude">
<devices>
<interface type="network">
<source network="default"/>
<model type="vfio"/>
</interface>
</devices>
</domain>
as expected.
This seems to violate the spec.
Interesting I found no testing of the fragid attribute at all in BOTH the XInclude conformance tests (https://www.w3.org/XML/Test/XInclude/) or the libxml2 test suite.