[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Subject: DOCBOOK-APPS: Including Fragments of other DocBook Documents
Hi All, I would like to be able to include fragments of other docbook documents in the document i'm writing. (to save maintaining information in two places etc. etc.). I'm sure others on this list will have wanted to do something similar, how have you solved this? Here i'm not talking about entity inclusions, both the (source) docbook document containing the fragment and the target docbook document are completed docbook documents. So far i've managed to use Xinlcude and do things along the lines of: ----- <?xml version="1.0"?> <!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" "docbookx.dtd" [ <!ELEMENT xi:include (xi:fallback)> <!ATTLIST xi:include xmlns:xi CDATA #FIXED "http://www.w3.org/2001/XInclude" href CDATA #REQUIRED parse (xml|text) "xml" encoding CDATA #IMPLIED > <!ELEMENT xi:fallback ANY> <!ATTLIST xi:fallback xmlns:xi CDATA #FIXED "http://www.w3.org/2001/XInclude" > ]> <article> <articleinfo> <title>Test</title> <author> <firstname>Sagar</firstname> <surname>Shah</surname> </author> </articleinfo> <section id="MyFirstSection"> <title>foo</title> <para>la la</para> <xi:include href="docbook-tech-support-1.dbk#xpointer(id('OtherIssues'))"/> </section> </article> ----------- This all works fine :-) ... but it's dissappointing to have to define the xinclude elements manually in every document. I could go one better by defining them in a second DTD and including that dtd as an entity, but it still doesn't sound absolutely perfect. Is this how others using xinclude have gone about it? Does DocBook have more 'native' support for acomphising this task? would it make sense to define the xinclude elements in DocBook? (probably not but i thought i'd ask anyway ;-) Or is there another way i could acompish the inclusion of sections from other documents? Any help or insight people could provide would be much appreciated. Regards Sagar Shah ===ANYTHING BELOW THIS LINE WAS ADDED AFTER I HIT SEND=== Visit our website at http://www.ubswarburg.com This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. This message is provided for informational purposes and should not be construed as a solicitation or offer to buy or sell any securities or related financial instruments.
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Powered by eList eXpress LLC