On Mon, Apr 07, 2008 at 11:43:26PM +0400, КА wrote:
> Hello!
> I'm using libxml2 (ver.2.6.31) under Linux (kernel 2.2.20).
> Some problem with XInclude.
[...]
> So:
> xmllint --xinclude maindoc.xml -> failed build URL...
> 
> 1. If i remove blank between symbol "1" and  string "man" (<item 
> name="1man">) at attribute section in both files then it works fine.

  See the XInclude spec describing the xinclude element is at
    http://www.w3.org/TR/xinclude/#include_element
It is an URI Reference so spaces need to be percent escaped.
The problem is that the construct you are trying to use (the full xpointer
scheme never made it in the final standard) so this construct

  <xinclude:include href="doc.xml#xpointer(/doc/tasks/[EMAIL 
PROTECTED]'1%20man']/coord)"/>

is in theory invalid in Xinclude, a separate xpointer attribute should be
used, but that allows only a very limited and near useless subset of what
XPointer was supposed to provide. Be concious it's a libxml2 specificity
not backed up by the standard.

> 2. Usually, i use koi8-r encoding. if use Cyrillics symbols here - xinclude 
> dont work, no matter blank remove or not.  
> 
> At the same time, XPath works fine in any case (with Cyrillics and blanks).
> Any solution?

  See URI escaping, you need to escape the character code point in an UTF-8
encoding using the %xx values.

Daniel

-- 
Red Hat Virtualization group http://redhat.com/virtualization/
Daniel Veillard      | virtualization library  http://libvirt.org/
[EMAIL PROTECTED]  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine  http://rpmfind.net/
_______________________________________________
xml mailing list, project page  http://xmlsoft.org/
[email protected]
http://mail.gnome.org/mailman/listinfo/xml

Reply via email to