Re: [xml] Problems with changed XInclude behavior
- From: Lars Weber <lars brokenbits de>
- To: veillard redhat com
- Cc: xml gnome org
- Subject: Re: [xml] Problems with changed XInclude behavior
- Date: 19 Dec 2003 16:55:39 +0100
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>
element).
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 "http://www.w3.org/2003/XInclude">
<!ELEMENT xi:include EMPTY>
<!ATTLIST xi:include
href CDATA #REQUIRED
xpointer CDATA #IMPLIED> ]>
<foo xmlns:xi="http://www.w3.org/2003/XInclude">
<xi:include href="bar.xml" xpointer="xpointer(bar/batz)"/>
</foo>
---
---[ bar.xml ]---
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE bar [
<!ELEMENT bar (batz)>
<!ELEMENT batz EMPTY> ]>
<bar>
<batz/>
</bar>
---
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.
Regards,
Lars
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]