Re: [xml] Problems with changed XInclude behavior

Daniel Veillard <veillard redhat com> wrote:
Now, as long as I only use the href attribute of xi:include I get the
result that I expect; the problem is that, for some reason, I'm unable to
get the xpointer attribute to do anything at all!

  strange, it's supposed to work, see test/XInclude/docs/nodes2.xml

Ok, if the above example works for you this seems to be a problem with the
libxml version in Debian... it doesn't work here (again it does not only
include the <p> elements, but instead the complete top-level <doc>

Hmmm... can anyone else here using the latest libxml2 from Debian unstable
please check whether either the example above or the one below works for
him or not?

---[ foo.xml ]---
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE foo [
  <!ELEMENT foo (xi:include)>
  <!ATTLIST foo
            xmlns:xi CDATA "";>
  <!ELEMENT xi:include EMPTY>
  <!ATTLIST xi:include
            href CDATA #REQUIRED
            xpointer CDATA #IMPLIED> ]>
<foo xmlns:xi="";>
  <xi:include href="bar.xml" xpointer="xpointer(bar/batz)"/>

---[ bar.xml ]---
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE bar [
  <!ELEMENT bar (batz)>
  <!ELEMENT batz EMPTY> ]>

When I run `xmllint --xinclude foo.xml' what I'd expect is for the <batz/>
element from bar.xml to replace the <xi:include> element in foo.xml.  For
some reason that doesn't happen, though.  I just get the same output that
I get without the xpointer argument.


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