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]

trying to use "xmlto" in red hat to customize PDF output


  technically, this may be more of a red hat question, but i'll
give it a shot anyway.

  i'm using tim waugh's XML-based "selfdocbookx" working environment
as a starting point to design some new manuals.  the Makefile that
comes with that uses his "xmlto" shell script as a front end
to the appropriate processor to generate the appropriate output.

  for HTML output, the way to call "xmlto" would be something like:

  $ xmlto html -o <dirname> -m fragment -m fragment ... inputfile.xml

where the fragments are small stylesheet files that are incorporated
into a larger stylesheet underneath.  a sample fragment file that i 
use:
-------------------------------------
<?xml version='1.0'?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
                xmlns:fo="http://www.w3.org/1999/XSL/Format";
                version='1.0'>

<xsl:param name="section.autolabel" select="1"/>

</xsl:stylesheet>
-------------------------------------

so i can customize the output by simply selecting the stylesheet
fragments that get passed to xmlto.  so far, so good, at least
with HTML output.

  the same holds for PDF output, with the Makefile running the
command:

  $ xmlto pdf -v --extensions -m frag1 -m frag2 ... inputfile.xml

once again, if i include the above "autolabel" fragment to be
passed to xmlto, sure enough, the resulting PDF file will have
sections auto-labelled.

  the problem comes when i try to add a stylesheet fragment whose
job it is to add page breaks before sections.  in reading bob
stayton's online docs, i'd want to add:

  <xsl:attribute-set name="section.title.level1.properties">
   <xsl:attribute name="break-before">page</xsl:attribute>
  </xsl:attribute-set>

but if i create another stylesheet fragment file, as in:

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

<?xml version='1.0'?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
                xmlns:fo="http://www.w3.org/1999/XSL/Format";
                version='1.0'>

<!-- Force section page breaks.. -->
<xsl:attribute-set name="section.title.level1.properties">
 <xsl:attribute name="break-before">page</xsl:attribute>
</xsl:attribute-set>

</xsl:stylesheet>

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

and add it to the xmlto command with "-m", it has no effect.
is this because it's not an xsl:param, but an xsl:attribute-set?
i'm going through the "xmlto" script now to see how it handles
fragments that are not just xsl:params, but does anyone know
if i can hand such a fragment to "xmlto" and have it processed
correctly?

  like i said, this is pretty much specifically an "xmlto"
question, so i'm hoping someone knows enough about it to 
give me some advice.

rday


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