RE: [xsl] displaying xslt using xsl:fo

Subject: RE: [xsl] displaying xslt using xsl:fo
From: "bryan" <bry@xxxxxxxxxx>
Date: Thu, 14 Nov 2002 17:48:59 +0100
>really..? I started down this route, using code like:

>  <fo:block>
>    <xsl:text>&lt;</xsl:text>
>    <xsl:value-of select="name()"/>
>    <xsl:text>&gt;</xsl:text>
>    <xsl:apply-templates/>
>    <xsl:text>&lt;/</xsl:text>
>    <xsl:value-of select="name()"/>
>    <xsl:text>&gt;</xsl:text>
>  </fo:block>

>and it felt like I was suffering the fate of many newbies and heading
in
>the wrong direction!

The example I was using with fo:inline etc. was because I was assuming
that you wanted something like the markup representation you can achieve
in a text editor with your brackets one color, the element name another
and some sort of cool coloring for attributes. Pretty much I figure you
gotta go through something like my example if that's what you want.



>  <fo:block>
>    <xsl:text disable-output-escaping="yes">&lt;![CDATA[</xsl:text>
>    <xsl:copy-of select="."/>
>    <xsl:text disable-output-escaping="yes">]]&gt;</xsl:text>
>  </fo:block>

>..which gets the templates through to the output, but the
presentational
>whitespace seems to be ignored (the code is just one lump)

>I tried using white-space-treatment="preserve", but fop tells me it
>doesn't implement this yet. 

You'll find there's lots Fop doesn't implement yet. Actually just
thinking about it, it might be cool to try fo:instream-foreign-object
and attempt to make an svg representation of the markup, with the markup
inside of a CDATA section, inside of an svg text element. In this way
one might be able to build something without worrying about escaping the
markup. Just a thought, specifically broached considering that you are
using FOP, I often find I have to do a conjunction between SVG and FO to
get more advanced layout possibilities when in FOP.

> Are any of the other fo processors capable
>of this?    
I'm betting Antenna House wouldn't be a problem.




 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread