[xml] Using xpointer with xmllint
- From: stuart shepherd <jonny wark googlemail com>
- To: xml gnome org
- Subject: [xml] Using xpointer with xmllint
- Date: Fri, 15 Jun 2012 15:20:10 +0100
Hi
I'm having trouble using xpointer with an xinclude.
Below is an extract of my xml file
<?xml version="1.0"?>
<card
xsl:noNamespaceSchemaLocation="shema.xsd"
.....
<xi:include href="" xpointer="element(/1/1)"/>
......
</card>
control.xml
<?xml version="1.0"?>
<root>
<control>
<id>8</id>
<name>ValidHd</name>
......
</control>
</root>
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
Stuart.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]