[xml] Using xpointer with xmllint


I'm having trouble using xpointer with an xinclude.

Below is an extract of my xml file

<?xml version="1.0"?>


<xi:include href="" xpointer="element(/1/1)"/>




<?xml version="1.0"?>

and I validate it with

xmllint --valid --xinclude --schema schema.xsd Xpointer.xml

and that works fine. But when I change the xinclude to 

<xi:include href="" = 'ValidHd'])"/> 

to try and include the control element by name so it's more robust I get the error message "Xpointer.xml:152: element include: Schemas validity error : Element '{http://www.w3.org/2001/XInclude}include': This element is not expected. Expected is ( control ).
Xpointer.xml fails to validate"

And you can see in the output that it hasn't substituted any code in for the xinclude.

What should I be doing?
Is it possible to include elements like this? The name element is unique within the control.xml document, which is why I thought I would be able to include it this way.

Thank you

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]