This is the mail archive of the
docbook@lists.oasis-open.org
mailing list for the DocBook project.
[docbook] Re: Future DocBook Ruminations - Modular Source Files & XInclude
- From: Norman Walsh <ndw at nwalsh dot com>
- To: "Wills, Robert" <Robert dot Wills at sts dot co dot uk>
- Cc: DocBook List <docbook at lists dot oasis-open dot org>
- Date: Wed, 20 Aug 2003 09:55:48 -0400
- Subject: [docbook] Re: Future DocBook Ruminations - Modular Source Files & XInclude
- References: <B0B3EF6EA2E66F4F80D39E793B4095EC0FE0E9@wm2kswi560.sts.co.uk>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
/ "Wills, Robert" <Robert.Wills@sts.co.uk> was heard to say:
| P1. All block-level elements except the topmost ('topmost' = <article>,
| <book> etc.) have new companion elements defined with names like
| <included-XXX>, e.g. <included-section>, <included-figure> etc.
|
| P2. Grammar is changed such that wherever <XXX> is valid, <included-XXX> is
| also valid.
|
| P3. Grammar of each <included-XXX> element is defined to allow exactly one
| child element which can be either the 'real' <XXX> element or an
| <xs:include> element (or by virtue of P2 a nested <included-XXX>), e.g. in
| DTD-like-syntax:
|
| !ELEMENT included-section (section | xs:include | included-section)
| !ELEMENT included-para (para | xs:include | included-para)
I don't think that's necessary to get the "right" behavior. The trick is simply
to make sure that xi:include elements are expanded before the validator kicks
in. Then we can simply say:
<article>
<section>
<title>Section 1</title>
<para>...</para>
</section>
<xi:include href="section2.xml"/>
</article>
And the validator (DTD, RELAX NG, whatever) will see
<article>
<section>
<title>Section 1</title>
<para>...</para>
</section>
<section>
<title>Section 2</title>
<para>...</para>
</section>
</article>
and be entirely content.
Be seeing you,
norm
- --
Norman Walsh <ndw@nwalsh.com> | ...it is significant that we are
http://www.oasis-open.org/docbook/ | called the 'information society'
Chair, DocBook Technical Committee | -- not the thinking society, not
| the deliberative society, not the
| society of reason and
| rationality.--Lloyd Morrisett
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.7 <http://mailcrypt.sourceforge.net/>
iD8DBQE/Q33kOyltUcwYWjsRAm6eAKCaGLO4RtrkjeQgaNvmw+dYlUSgoACfV3Aq
GoTTQidaWAT5znEKZkWzhVk=
=13l1
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: docbook-help@lists.oasis-open.org