This is the mail archive of the docbook-apps@lists.oasis-open.org mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [docbook-apps] Docbook and DSSSL questions...


At 2004-06-28T14:06:01+02:00, Arnaud Fontaine wrote:

> I would like know too if it's possible to generate separate PDF files,
> like html files (one pdf file for one xml file).
> 
> Is it easy to do ?

Hi Arnaud,

One way is to use a wrapper with each subdocument that you want to
format as an independent PDF file.  Suppose you have included
`chapter.sgml' in your main document, and that `chapter.sgml' has root
element `chapter':

----- chapter.sgml -----

<chapter>
  <title>Required Chapter</title>

  <para>At least one chapter, reference, part, or article is required
    in a book.</para>
</chapter>

----- chapter.sgml ends here -----

Then, you can create two files {head,foot}er.sgml as follows:

----- header.sgml -----

<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook V4.2//EN"
[
 <!ENTITY bar SYSTEM "bar/bar.xml">
 <!ENTITY author "F.B. Quux">
]>

<book>

----- header.sgml ends here -----

----- footer.sgml -----

</book>

----- footer.sgml ends here -----

Now, run `openjade' as:

  openjade -t tex -d stylesheet.dsl -V tex-backend \
           header.sgml chapter.sgml footer.sgml

(According to onsgmls(1), "if more than one system identifier is
specified, then the corresponding entities will be concatenated to
form the document entity.")

Whether this method works will depend on the structure of your
subdocuments.  If they are fairly independent of each other, there
should be no problem.  On the other hand, if there are, for instance,
`xref' elements pointing from one subdocument to another, I think
there will be problems.

I have used SGML in the above example, because that is what I use, but
the XML case should be similar.

HTH.

Cheers,
Raghavendra.

-- 
N. Raghavendra <raghu@mri.ernet.in> | See mail headers for contact
Harish-Chandra Research Institute   | and OpenPGP details.


To unsubscribe from this list, send a post to docbook-apps-unsubscribe@lists.oasis-open.org, or visit http://www.oasis-open.org/mlmanage/.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]