W3C home > Mailing lists > Public > www-xsl-fo@w3.org > February 2001

extensions to FO

From: Kelly Campbell <camk@channelpoint.com>
Date: Fri, 2 Feb 2001 11:28:33 -0700
Message-ID: <E583503B7F57D41196A600D0B76FDDD54B299D@cpex2.channelpoint.com>
To: "'www-xsl-fo@w3.org'" <www-xsl-fo@w3.org>
I brought this subject up on the FOP-dev list about a month and a half ago,
but I'm closer to actually implementing something which would require adding
new elements to an xsl fo file and wanted to see if there is any concensus
about how to do it.

The general need is to include some structural, non-layout information in an
FO file in order to keep some of the original XML document's information
when processing through a FO processor like FOP. The use-case I'm thinking
of is outline headings for PDF bookmarks.

I couldn't find anything which addresses this very well in the candidate
recommendation. Basically, I was thinking of something along the lines of
the following:

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

I wonder if the FO spec would allow for such a structure of elements from
other namespaces wrapping elements from the FO namespace similar to how XSLT
allows result elements to wrap XSLT elements. It seems like this is possible
from section 2.1 of the spec, but it's unclear of what specifically "Tree
Construction" refers to in the XSLT spec. Is it referring to section 7,
"Creating the Result Tree"? 

Keeping structural information from the original XML might also be done via
extension attributes in a different namespace as allowed by section 2.2 of
the candidate rec. Does anyone have any opinions of which would be better?
The outlines use-case requires a hierarchy of elements such as in the above
example. In that example, all the fo:blocks are siblings, but the fop:toc
elements have a parent-child relationship. For this reason, I like the
extension elements version rather than extension attributes.

Another use case I can think of off-hand are PDF's structural tags such as
heading and paragraph and such which can be tagged in the PDF.  When you're
converting a DocBook tagged file into FO, you lose most, if not all, of the
semantic information, and have just visual and aural presentation
information left.

Kelly A. Campbell                       Software Engineer
<camk@channelpoint.com>                 ChannelPoint, Inc.
<camk@merlotxml.org>                    Colorado Springs, Co.
Received on Friday, 2 February 2001 13:29:14 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:09:52 UTC