RE: [xsl] displaying xslt using xsl:fo

Subject: RE: [xsl] displaying xslt using xsl:fo
From: "bryan" <bry@xxxxxxxxxx>
Date: Thu, 14 Nov 2002 16:35:52 +0100
>Has anyone written a xsl:fo stylesheet to display xslt (or any kind of

>Its appears that fop is treating all the xslt and html mark up as
>instructions, almost as if it isnt namespace aware...  I've only
>on xsl:fo today (with the help Dave P's online book, cheers dave!) so
>any gentle looseners are appreciated.

Well you'd need to have a generic markup handler in the same way you
would need it if you wanted to display markup in your html.

At that point I guess it just becomes a question as to how do I want to
display markup when printing to a pdf, i.e a logic of presentation
question. Are there any parts of xslt markup that should be presented
differently than other parts. Probably you would want to have two
different types of block containers for 
xsl:template[@match] and xsl:template[@name]
then everything below that in the xsl namespace gets individual blocks,
everything not in the xsl namespace goes into one block with escaped

<xsl:template match="foo">

gets analyzed, without presentation properties of attributes, in this

<xsl:template match="xsl:template[@match]">
<fo:block-container><fo:block><xsl:call-template name="tagmatcher1"/>
<xsl:apply-templates mode="genericmarkup"/>
<fo:block><xsl:call-template name="tagender1"/> </fo:block>

<xsl:template name="tagmatcher1">
<fo:inline>&lt;</fo:inline><xsl:value-of select="name()"/> <xsl:for-each

<xsl:template name="tagender1">


<xsl:template match="*" mode="genericmarkup">
<fo:block><xsl:call-template name="tagmatcher1"/> </fo:block>
<xsl:apply-templates mode="genericmarkup"/>
<fo:block><xsl:call-template name="tagender1"/> </fo:block>

which would give you something like this(supposing I haven't made any
semantic mistakes above nor any keyboard entry errors below)




this is similar to what I do with anything contained within a <code
type="markup"></code> node in my markup.

 XSL-List info and archive:

Current Thread