[docs] Fw: Re: DOCBOOK: Re: Advantages of XInclude?

Vitaly Ostanin vyt на vzljot.ru
Чт Ноя 14 12:56:05 MSK 2002


Hello, All!

Все идёт к тому, что DocBook DTD будет следовать спецификации
XInclude и включит в общие атрибуты атрибут xml:base.

До тех пор можно использовать workaround, добавляя xml:base в
начало каждого документа (который использует XInclude и
нуждается в проверке на валидность).

Собственно, вопрос - будем ждать обновления DTD, или 
воспользуемся workaround для документов в cvs docs ?

Я бы предложил воспользоваться.



Begin forwarded message:

Date: Wed, 13 Nov 2002 22:57:35 -0800
From: Bob Stayton <bobs на caldera.com>
To: veillard на redhat.com
Cc: Janning Vygen <vygen на gmx.de>, Norman Walsh <ndw на nwalsh.com>,
kim.weit на swipnet.se, docbook на lists.oasis-open.org Subject: Re:
DOCBOOK: Re: Advantages of XInclude?


On Wed, Nov 13, 2002 at 10:33:16AM -0800, Bob Stayton wrote:
> On Wed, Nov 13, 2002 at 01:14:30PM -0500, Daniel Veillard
> wrote:
> > On Wed, Nov 13, 2002 at 09:34:17AM -0800, Bob Stayton wrote:
> > > >   Right, XInclude requires the addition of xml:base at
> > > >   the inclusion
> > > > point (unless the document included and the main one
> > > > share a base which makes it unecessary, like if they are
> > > > in the same directory). I see no other way than adding
> > > > xml:base  to the DocBook DTD (which would make sense to
> > > > me but it's not my call.)
> > > 
> > > I was going to suggest using an XML catalog to locate
> > > XIncludes, so that any xml:base could appear in the catalog
> > > file rather than the document. 
> > 
> >   that won't do it. XInclude does not need xml:base in the
> >   input, it adds it
> > to the output. The goal is to keep all URI-References made
> > from the included parts correct. Basically if main.xml
> > includes chap/chap1.xml and chap1.xml references img1.jpg ,
> > the the presence of the xml:base added at the inclusion point
> > preserves the "img1.jpg" URI-Reference from the chapter
> > included. Explained formally at:
> >    http://www.w3.org/TR/xinclude/#base
> 
> OK, thanks for clarifying that.

There is a workaround for this xml:base validation problem,
until it can get put into the DocBook DTD.

Any including document could extend the DocBook DTD
in the internal subset to permit xml:base.  There is
even a convenient parameter entity to do it:

<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
     "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
<!ENTITY % local.common.attrib "xml:base  CDATA  #IMPLIED">
]>

This permits the xml:base attribute in just about every
DocBook element.  This extension would only have to be added
to those files that need it.  That is, those files that
are going to submitted to validation, and which have
includes of files that are in a different directory from
the including document.  

It would have to be removed when the standard DTD
is updated to support xml:base.

-- 

Bob Stayton                                 400 Encinal Street
Publications Architect                      Santa Cruz, CA  95060
Technical Publications                      voice: (831) 427-7796
The SCO Group                               fax:   (831) 429-1887
                                            email: bobs на sco.com


-- 
Regards, Vyt
mailto:  vyt на vzljot.ru
JID:     vyt на vzljot.ru
----------- следущая часть -----------
Было удалено вложение не в текстовом формате...
Имя     : отсутствует
Тип     : application/pgp-signature
Размер  : 189 байтов
Описание: отсутствует
Url     : /pipermail/docs/attachments/20021114/1b09566f/attachment.bin


Подробная информация о списке рассылки docs