Re: [xml] Using xpointer with xmllint

On Fri, Jun 15, 2012 at 03:20:10PM +0100, stuart shepherd wrote:

I'm having trouble using xpointer with an xinclude.

<?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="control.xml" xpointer="xpointer(//control[../name =

  Seems your XPath expression won't select what you expect, the
//control select the nodes you intent but then you condition that
on a test using ../name. And there is no ../name for that control
node only a name child.
  use xmllint --shell control.xml
and then test your XPath expressions with the xpath shell command,


Daniel Veillard      | libxml Gnome XML XSLT toolkit
daniel veillard com  | Rpmfind RPM search engine | virtualization library

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