Re: [xslt] how to avoid lots of xmlns:xi and still get a valid doc



On Tue, Aug 21, 2007 at 11:48:50AM +0200, Francesco Montorsi wrote:
> Hi all!
> 
>     I have the following dummy problem: I need to <xi:include> lots of 
> files into my XML file (called manual.docbook); however each line 
> currently looks as
> 
> <xi:include href="aboutdialoginfo.docbook" 
> xmlns:xi="http://www.w3.org/2001/XInclude"/>
> 
> is there a way I can avoid the xmlns:xi attribute ?
> I have a big number of <xi:include> and it will be a lot of redundancy 
> if I must put the xmlns:xi attribute in each tag.
> 
> I have tried to put the xmlns:xi attribute at the <book> root of my XMl 
> document element, but then xmllint complains it's not a valid attribute 
> for docbook DTD (which I'd really prefer not to hand-edit):
> 
> book: validity error : No declaration for attribute xmlns:xi of element book
> 
> I am using the following command line for validation:
> 
> xmllint --xinclude --postvalid --noent --nonet --noout 
> docbook/manual.docbook
> 
> Any hint?

  Update your DocBook DTD, this was supposed to be fixed there, by allowing
the namespace dclarations for XInclude on at least some elements.

Daniel

-- 
Red Hat Virtualization group http://redhat.com/virtualization/
Daniel Veillard      | virtualization library  http://libvirt.org/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine  http://rpmfind.net/


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