You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@forrest.apache.org by Moshe Yudkowsky <ms...@bl.com> on 2004/02/18 15:32:30 UTC
Why do font, etc. instructions appear in XSL templates?
I've been looking at forrest for the past couple of days, and I'll probably
migrate my current web site sometime today or tommorow.
I am very puzzled by some of the reasoning in the xsl files that I've found,
however. The files contain instructions that I thought would be properly
delegated to the CSS files. For example, in common/xslt/fo/document2fo.xls, we have
<xsl:template match="notice">
<fo:block
font-size="10pt"
text-align="left"
space-before="20pt"
width="7.5in"
font-family="serif"
border-top="0.25pt solid"
border-bottom="0.25pt solid"
padding-before="6pt"
padding-after="6pt">
NOTICE: <xsl:apply-templates/>
</fo:block>
</xsl:template>
In other words the font size is hard-coded and is not in CSS. It would seem to
me that a true "separation of concerns" would have this formatting information
in CSS where it would be easily modified.
So, two questions:
(1) Is there a collection someplace of skins other than the ones in the
distribution? In particular, I am looking for a skin that uses the CSS files to
accomplish all font variations, background colors, etc. For that matter, I like
to use "float" and "position" to align my div blocks.
(2) What is the reason that the XSL contains these font-family instructions?
"History" is a good reason, by the way. But if it's something deeper I would
appreciate a 25 word or longer explanation.
--
Moshe Yudkowsky
Disaggregate
2952 W Fargo
Chicago, IL 60645 USA
<http://www.Disaggregate.com>
Re: Why do font, etc. instructions appear in XSL templates?
Posted by Dave Brondsema <da...@brondsema.net>.
Quoting Moshe Yudkowsky <ms...@bl.com>:
> I would like to thank everyone who replied to my message, both on-list and
> offlist.
>
> Allow me to modify my question. skins/forrest-site/xslt/html/site2xthtml.xsl
>
> also contains examples of setting font properties. For example, in the
> breadcrumb trail section:
>
> <font face="Arial, Helvetica, Sans-serif" size="2">
>
> In practice, what this means to me is that I had to start by using the
> template
> and work my way up in complexity to get the skin for my website. I would have
>
> liked to start with forrest-site and pared away features I didn't need.
>
> Again, the question is whether forrest-site is that way for historical
> reasons,
> or if there's a program-driven reason.
>
forrest-site hasn't changed much lately; forrest-css should look pretty much the
same, but uses CSS. krysalis-site is one of the most popular skins; and if you
want to base your skin on one that uses CSS you should also consider tigris-style.
--
Dave Brondsema
dave@brondsema.net
http://www.brondsema.net - personal
http://www.splike.com - programming
http://csx.calvin.edu - student org
Re: Why do font, etc. instructions appear in XSL templates?
Posted by Moshe Yudkowsky <ms...@bl.com>.
I would like to thank everyone who replied to my message, both on-list and offlist.
Allow me to modify my question. skins/forrest-site/xslt/html/site2xthtml.xsl
also contains examples of setting font properties. For example, in the
breadcrumb trail section:
<font face="Arial, Helvetica, Sans-serif" size="2">
In practice, what this means to me is that I had to start by using the template
and work my way up in complexity to get the skin for my website. I would have
liked to start with forrest-site and pared away features I didn't need.
Again, the question is whether forrest-site is that way for historical reasons,
or if there's a program-driven reason.
--
Moshe Yudkowsky
Disaggregate
2952 W Fargo
Chicago, IL 60645 USA
<http://www.Disaggregate.com>
RE: Why do font, etc. instructions appear in XSL templates?
Posted by Conal Tuohy <co...@paradise.net.nz>.
J.Pietschmann wrote:
> Moshe Yudkowsky wrote:
> > I am very puzzled by some of the reasoning in the xsl files
> that I've
> > found, however. The files contain instructions that I
> thought would be
> > properly delegated to the CSS files. For example, in
> > common/xslt/fo/document2fo.xls, we have
> >
> > <xsl:template match="notice">
> > <fo:block
> > font-size="10pt"
> ...
> > In other words the font size is hard-coded and is not in CSS.
>
> XSLFO does not use CSS.
Perhaps the equivalent SoC could be achieved by moving all the formatting
attributes into named xsl:attribute-sets, then they could be in a separate
file linked with xsl:include, or in a separate pipeline stage even.
Con
Re: Why do font, etc. instructions appear in XSL templates?
Posted by "J.Pietschmann" <j3...@yahoo.de>.
Moshe Yudkowsky wrote:
> I am very puzzled by some of the reasoning in the xsl files that I've
> found, however. The files contain instructions that I thought would be
> properly delegated to the CSS files. For example, in
> common/xslt/fo/document2fo.xls, we have
>
> <xsl:template match="notice">
> <fo:block
> font-size="10pt"
...
> In other words the font size is hard-coded and is not in CSS.
XSLFO does not use CSS.
J.Pietschmann.