First: Sorry I forgot to fill the mail subject ...

> Sure, we do that all the time here at XMLmind. The main difference
> between you and us is that we do not feel the need to double-check our
> documents using xmllint.

Well, it's less a reason of double-checking than one of automation issues. I 
use XXE as an editor in a "classical" docbook toolchain: Part of that is two 
resolve xincludes via xmllint, do the xsl transformation with saxon and create 
the PDF with apache's fop. And while I could very well live with a duplicate 
ID, fop throws an error and stops transformation.

Any idea how to deal with this? BTW, the 3.3 feature to ignore such errors 
sounds promising, at least for the editing part ... 

Thanks for your efforts!
Patrick

-------- Original-Nachricht --------
Datum: Mon, 21 Aug 2006 15:32:35 +0200
Von: Hussein Shafie <hussein at xmlmind.com>
An: versorger at gmx.li
Betreff: Re: [XXE] (no subject)

> versorger at gmx.li wrote:
> > 
> > I'm having a hard time with xinclude: I have two files FOO and BAR, each
> representing a docbook chapter. In chapter FOO I have a table that I would
> like to refer to in chapter BAR. With XMLMind this is possible by adding
> an id attribute to the table element. Now I can "copy as reference" the
> table from FOO and paste the reference into BAR. So far so good and my chapter
> BAR is a valid instance of docbook. 
> > 
> > The problem comes when I process the whole book where both chapters FOO
> and BAR are referenced via xinclude: After I have resolved the includes
> with xmllint I end up with an invalid instance of docbook due to the fact that
> the table, along with its id attribute, is now present twice. 
> 
> Simply ignore this kind of duplicate ID errors. This kind of problem is
> *intrinsic* to the use of XInclude with the element() scheme and there
> is *nothing* that can be done.
> 
> 
> 
> > By the way, I also get a (correct) warning about duplicate IDs when when
> I open the book in XMLMind.
> 
> As of v3.3, Options|Options, Tools|Validate section, checkbox "Filter
> duplicate ID errors found in modular documents" allows to discard this
> kind of duplicate ID errors (but not other duplicate ID errors).
> 
> 
> > 
> > After some reading on xinclude I came up with the following solution to
> use in BAR: 
> > 
> > <table id="newID">
> >   <xi:include href="FOO" xmlns:xi="http://www.w3.org/2001/XInclude";
> >               xpointer="xpointer(id('someID')/*)" />
> > </table>
> > 
> > I manually enter the table element and simply xinclude all child nodes,
> leaving out the id attribute. xmllint will happily process this while
> XMLMind chokes on the unsupported scheme for XPointer. 
> 
> * XInclude does not mandate supporting the xpointer() scheme, only the
> element() scheme.
> 
> * Unlike the element() scheme, the xpointer() scheme is not yet a W3C
> recommendation but only a working draft. See
> http://www.w3.org/TR/xptr-xpointer/
> 
> 
> 
> > Now I am pretty sure that it's a common request to reuse content like I
> plan to do. 
> 
> Sure, we do that all the time here at XMLmind. The main difference
> between you and us is that we do not feel the need to double-check our
> documents using xmllint.
> 
> 
> 
> > I am sure there is a nice and clean way to achieve this with both
> XMLMind and any other tool and I was just not able to find it ...
> 
> Once again, simply *ignore* this kind of duplicate ID errors.
> 
>  
> --
> XMLmind XML Editor Support List
> xmleditor-support at xmlmind.com
> http://www.xmlmind.com/mailman/listinfo/xmleditor-support

-- 


Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
Ideal f?r Modem und ISDN: http://www.gmx.net/de/go/smartsurfer

Reply via email to