You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by Kelly Campbell <ca...@channelpoint.com> on 2000/12/18 22:34:30 UTC

how to extend XSLFO?

I was wondering if anyone has yet discussed proprietary additions to XSLFO,
and how to go about adding something. The use-case I am thinking of is a PDF
table of content markers for adding bookmarks in the left-hand pane of
Acrobat reader to give the user an easier navigation of a document. I didn't
see anything in the FO spec that seemed to work for something like this.
Perhaps this discussion is better suited for the xsl-dev list, but I thought
I'd try here first since the other list seems geared more towards xslt.

Would it be evil to start adding something like fop extensions in a
different namespace for this type of extra functionality? e.g:

<fop:toc label="Introduction">
  <fo:block id="sect-intro">
   Section 1: Introduction
  </fo:block>
  <fo:block>
    Some text for the section
  </fo:block>
  <fop:toc label="subsection">
    <fo:block>
     Section 1.1: stuff
    </fo:block>
  </fop:toc>
</fop:toc>

-Kelly
--
Kelly A. Campbell                       Software Engineer
<ca...@channelpoint.com>                 ChannelPoint, Inc.
<ca...@merlotxml.org>                    Colorado Springs, Co.


Re: Page size

Posted by "Peter B. West" <pb...@powerup.com.au>.
A little more detail.  The table is defined with three columns, and each
section (in this case the Tract) goes into one cell; English on the
left, Latin on the right, with an empty cell between.)

Peter
-- 
Peter B. West  pbwest@powerup.com.au  http://powerup.com.au/~pbwest
"Lord, to whom shall we go?"

Re: how to extend XSLFO?

Posted by Sebastian Rahtz <se...@computing-services.oxford.ac.uk>.
Kelly Campbell writes:
 > I was wondering if anyone has yet discussed proprietary additions to XSLFO,
 > and how to go about adding something. The use-case I am thinking of is a PDF
 > table of content markers for adding bookmarks in the left-hand pane of
 > Acrobat reader to give the user an easier navigation of a document. I didn't
 > see anything in the FO spec that seemed to work for something like this.

have you considered "role"? I want to see if I can use that, but I
have not come back to it yet

 > Would it be evil to start adding something like fop extensions in a
 > different namespace for this type of extra functionality? e.g:

PassiveTeX supports bookmarks by adding them whenever the heading
itself is met. eg:

<xsl:template match="div2">
     <xsl:apply-templates select="head"/>
     <fotex:bookmark  
	xmlns:fotex="http://www.tug.org/fotex" 
	fotex-bookmark-level="2"
	fotex-bookmark-label="{@id}">
        <xsl:value-of select="head"/>
     </fotex:bookmark>
  </fo:block>
</xsl:template>

for each bookmark, you need the section heading, the level, and an ID
to point to. I am not sure your example covers all the bases,
actually; you dont specify where the bookmarks are to link to.

sebastian