[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

xsl:fo in web browsers

Subject: xsl:fo in web browsers
From: Vidar Gundersen <vidarg@xxxxxx>
Date: 10 Sep 1999 10:05:18 +0200
vidar gundersen
Why not display XML using XSL Formatting Objects in Web browsers?

I have this idea: Any browser with XSL, CSS and HTML 4.0 support can
in principle transform the FO document instance into HTML with inline
CSS.

An example: The template below...

  <xsl:template match="title">
    <fo:block background-color="yellow" border-style="solid"
      font-family="sans-serif" font-size="20pt" font-weight="bold">
      <xsl:apply-templates/>
    </fo:block>
  </xsl:template>

...is displayed with the following HTML:

<div style="background-color: yellow; border-style: solid;
font-family: sans-serif; font-size: 20pt; font-weight: bold; ">Just
testing an idea.</div>

All you need is a mechanism that recognises the "fo" namespace in
the result-tree and applies a new stylesheet to it.

A simple example template for XSL:FO to HTML+CSS transformation:

  <xsl:template match="fo:block">
    <div>
      <xsl:attribute name="style">
	<xsl:for-each select="@*">
	  <xsl:value-of select="name()"/>
	  <xsl:text>: </xsl:text>
	  <xsl:value-of select="."/>
	  <xsl:text>; </xsl:text>
	</xsl:for-each>
      </xsl:attribute>
      <xsl:apply-templates/>
    </div>
  </xsl:template>

BTW: Have anyone made a complete stylesheet
for XSL:FO to CSS or HTML+CSS tranformation?

I can't see any reason not to put this
feature into future Web browsers...

-- 
Vidar Bronken Gundersen


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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.