OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [docbook] repeating/re-occuring info


René

>>I have a list in my docbook that I would like to re-occur in a few spots 
in my document. I could do it by making that list an entity, but wouldn't 
that screw up linking and cross-references to point to that list? Just 
want to avoid copying/pasting.

You could use XInclude in the following fashion:

<book lang="en_GB">
   <bookinfo>
      <title>Book</title>
      <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"; 
href="legalnotice.subdoc.xml" />
   </bookinfo>
...
</book>

where legalnotice.subdoc.xml looks like:

<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" 
"file:///c:/docbook/dtd/docbookx.dtd" []>
<legalnotice>
  <title>Licensing Information</title>
  <para>Copyright Notice</para>
...
</legalnotice>

In your case, the subdoc would encapsulate your list in some fashion. 

Applying Stylesheets to get HTML or PDF (say) would be a 2 step process. 
The first step being a call to xmlint.exe to "resolve" the docbook 
document. ie. automatically resolve your xinclude references by inserting 
the subdoc text into a new docbook document (which can then be converted 
to HTML or PDF).

A extract from my batch file that does this looks like this:

echo Resolving XIncludes %1:
xmllint.exe -xinclude %1.xml > %1.resolved.xml
echo  validating %1:
xmllint.exe -noout -valid -postvalid %1.resolved.xml

(where %1 is the name of my docbook document - without the extension).

Caveat: I understand that not all docbook elements can be used as the root 
element in an xincluded subdoc. I can't remember why and I'm yet to 
discover one that doesn't work (perhaps I've been lucky).

Mart
PS: If you do start using ede (see other posting), I can send you some 
mods I made to the batch files to help me with this sort of issue.



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]