← Prev in month ← Prev in thread

Re: [docbook] Polymorphic Modular DocBook

From
"Cob Rtayton"
Date
2006-06-22T15:04:33+00:00
ID
023001c69615$eb817f90$6700a8c0@totoro
Thread
Re: [docbook] Polymorphic Modular DocBook
[I'm moving this thread over to the docbook-apps list where such 
applications should be discussed]

Yes, it is possible to do this with the right XInclude processor. 
This example in my book:

http://www.sagehill.net/docbookxsl/DuplicateIDs.html

shows how to include the content of a section without including 
its section wrapper, in this case to avoid a duplicate id, but 
you could use the same xpointer() syntax with a chapter.

<appendix>
  <xi:include href="modules/chapter1.xml" 
xpointer="xpointer(/chapter/node())" 
xmlns:xi="http://www.w3.org/2001/XInclude"/>
</appendix>

I replaced "*" with "node()" here to preserve processing 
instructions, comments, and text.  This method works with 
xsltproc, but the Xerces XInclude processor does not handle the 
xpointer() scheme.  If you are using a Java XSLT processor, you 
could use xmllint --xinclude as a preprocessor step to resolve 
XIncludes before feeding the result to Saxon.

Bob Stayton
Sagehill Enterprises
DocBook Consulting


----- Original Message ----- 
From: "Camille B嶲nis" <>
To: "docbooklist" <>
Sent: Thursday, June 22, 2006 5:15 AM
Subject: [docbook] Polymorphic Modular DocBook

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi all,
>
> I used big words in the subject, but it's a simple issue: When 
> doing
> modular DocBook, it sometimes happen that a "chapter" module 
> wants to be
> reused as an "appendix" for example...
>
> Is the only solution to use tinier modules by chunking at the 
> "section"
> level, or is there something more intelligent?
>
> Or should we consider DocBook is not meant to be extremely 
> modular,
> other grammars like DITA are more suited?
>
> Interested in hearing your experience.
>
> Camille.
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.2.2 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFEmonQjv9P65BfOUMRAuqFAJ9RlFh43Jn//l5LCaP9/yN1S8D2qQCfRxNG
> IV+TMnLp+nz+mQJ5OBN92fg=
> =iban
> -----END PGP SIGNATURE-----
>

--------------------------------------------------------------------------------

> ---------------------------------------------------------------------
> To unsubscribe, e-mail: 
> 
> For additional commands, e-mail: 
> 
← Prev in month ← Prev in thread