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

RE: Future of XSL-FO at W3C??


compare xsl fo css
>> Future of XSL-FO at W3C, I
>> suggest XSL-FO 2 allows CSS styling.

>I find this a bizarre suggestion!

Hmm, I'm glad I left out the whipping of XSL-FO editors with licorice
whips then :)

>compare, 

>CSS styled:

>   x {
>   display: block;
>   text-align: right;}
   
>   <x> ..... </x>


>and XSL styled

>   <xsl:template match="p">
>   <fo:block text-align="right">
>     <xsl:apply-templates/>
>   </fo:block>
>   </xsl:template>

Come now, that is not the way more advanced styling scenarios work.

First off, the fo:block tag is a presentation element in it's own right,
just as the p tag is, so the example should be a little more like this

fo:block{
text-align:right;

}
 
.exampleblock{background-color:red;font-size:10pt;}
.exampleblock fo:block{background-color:green;}

<xsl:template match="p">
<fo:block>
<xsl:apply-templates/>
</fo:block></xsl:template>

<xsl:template match="section">
<fo:block class="exampleblock">
<xsl:if test="parent::section"><xsl:attribute
name="font-size">13pt</xsl:attribute></xsl:if>
<xsl:apply-templates/>
</fo:block>
</xsl:template>

just an example. 
  

>In what way is the separation in CSS greater?

The separation is greater because I can control inheritance easier with
the css, the separation is greater because the separation I discussed in
my earlier post was not so much the separation of content and
presentation although I think that is improved by css as well but the
separation of tasks, i.e someone can work on the css without knowledge
of xslt, furthermore the reference model between css and a markup format
is different than the reference model between xslt and a markup format.
CSS is called by the markup, xslt is ran against the markup. 

I find that this model gives far greater flexibility in styling.

I am certainly not suggesting that css is superior to XSLT; I do
extremely nasty things from a great height on such a suggestion most
definitely. I love XSLT dang-it, it's XSL-FO that pisses me off. :)

>XSL-FO is a linearisation of the _result_  it would be peverse indeed
to
>state that the result of applying FO formatting could not be a styled
>object but rather something to which you had to apply a stylesheet in a
>different language.

Hmm I can somewhat see the point of what you say there, but not really.
SVG is a styled object as well, in that in the final analysis it
consists of tags that have some specific presentation inherent to them,
just as indeed HTML does, yet these can still be styled further. 


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
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

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.