Re: [xml-dev] XSLT vs. CSS (Re: Indexing)
by Norman Walsh other posts by this author
Jul 8 2003 2:31PM messages near this date
[xml-dev] XSLT vs. CSS (Re: Indexing)
|
Re: [xml-dev] XSLT vs. CSS (Re: Indexing)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
/ Michael Day <mikeday@[...].com> was heard to say:
| For example, if I wish to have an indent on paragraphs in my document, I
| need only add the following rule to my user style sheet:
|
| para { text-indent: 5mm }
|
| However, the XSLT based approach is more complicated. I could create a
| template for para, but then that would override *all* of the default
| styling for paragraphs, which is not what I want. The lack of additive,
Maybe you want to do this then:
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format"
version="1.0">
<xsl:import href="/path/to/base/stylesheet"/>
<xsl:template match="para">
<fo:block text-indent="5mm">
<xsl:apply-imports/>
</fo:block>
</xsl:template>
</xsl:stylesheet>
(The HTML case is similar, though it probably relies on CSS so perhaps it makes
more sense to simply apply CSS to the resulting HTML.)
| For this reason I believe that CSS is a more effective approach for
| styling XML documents, while XSLT is best used for more general
| transformation tasks, such as generating documents and reports from
| "data-oriented" XML, or migrating from one vocabulary to another.
That's not my impression, but "de gustibus non est disputandum" as the
saying goes.
Be seeing you,
norm
- --
Norman.Walsh@[...].COM | The function of the imagination is not to
XML Standards Architect | make strange things settled, so much as it is
Web Tech. and Standards | to make settled things strange.--G. K.
Sun Microsystems, Inc. | Chesterton
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.7 <http://mailcrypt.sourceforge.net/>
iD8DBQE/CtXeOyltUcwYWjsRAvozAKCKhIVhiPcatWue44h6H3u6n0Y8vgCgrlkE
J/p2Vfxbbl/TxttTP8q5IE0=
=QX6S
-----END PGP SIGNATURE-----
-----------------------------------------------------------------
The xml-dev list is sponsored by XML.org <http://www.xml.org> , an
initiative of OASIS <http://www.oasis-open.org>
The list archives are at http://lists.xml.org/archives/xml-dev/
To subscribe or unsubscribe from this list use the subscription
manager: <http://lists.xml.org/ob/adm.pl>
Thread:
Michael Day
Norman Walsh
Mitch Amiano
Michael Day
Thomas B. Passin
Dave Pawson
Simon St.Laurent
Dave Pawson
Simon St.Laurent
Eric van der Vlist
Didier PH Martin
Simon St.Laurent
Mitch Amiano
Didier PH Martin
Michael Kay
Dave Pawson
Simon St.Laurent
Simon St.Laurent
Thomas B. Passin
Simon St.Laurent
Thomas B. Passin
Simon St.Laurent
|