Sign In/My Account | View Cart  
advertisement

Article:
 Printing XML: Why CSS Is Better than XSL
Subject: why it's not better, specifically when doing TOCs
Date: 2005-01-29 04:04:12
From: julian.reschke@gmx.de

Generating a Table of Contents as a matter of fact is a very good examle why CSS on it's own is not better.


The example relies on the TOC being already present in the input file (in this case, the WebArch document's HTML version) -- thus, it doesn't generate it, but merely styles it. This may be acceptable for many (X)HTML documents and some custom XML formats that already contain a TOC, but in general when XML is used for document markup, people will expect that the TOC is automatically generated from the document itself (see, for instance, RFC2629's XML format).


That being said, the test version of Prince is really useful for people who want to better support paged media in their CSS (I just fixed some aspects of rfc2629.xslt).


Julian


Previous Message Previous Message   Next Message Next Message


Titles Only Titles Only Newest First
  • why it's not better, specifically when doing TOCs
    2005-02-01 14:48:05 howcom [Reply]

    True, CSS cannot generate the TOC. (Some proposals for how to express this have been floating around, but none are supported by common tools.) So, if you want to automatically generate a TOC you must use another tool. For example, W3C has published a tool called "multitoc" as part of the html-xml-utils package. Or, you can use XSLT or Perl to generate a TOC. We believe in using different tools for different tasks. Making a TOC is one task and styling it is another. The paper tries to explain why CSS is a better style sheet language.


Sponsored By: