|
[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: XML+SVG, XML+CSS, XML+XSL (was Re: Bad News on IE6 XML Support)
At 09:48 PM 9/8/2001 -0400, Winchel 'Todd' Vincent III wrote: >Assuming that (1) "*still* separat[ing] content from presentation" and (2) >"edit once, present everywhere" are the goals, and assuming further that >what you mean above is that "content" = "(perhaps any) XML" and >"presentation" = "SVG", then what is the difference between: > >XML (content) + SVG (presentation) > >and > >XML (content) + CSS (presentation) > >and while we're at it . . . > >XML (content) + XSL (presentation) I'd suggest that these two are very similar: XML (content) + SVG (presentation) XML (content) + XSL-FO (presentation) In both of those cases, having an XML-based presentation vocabulary pretty much demands a transformation in between. The other choice is different: XML (content) + CSS(presentation) The difference involves more than the use of a non-XML syntax. CSS is very different from both SVG and XSL-FO because it's not about creating a "CSS document". CSS is about providing information for existing documents. While you can include CSS properties in an (X)HTML style attribute, most of the power in the CSS approach comes from its insistence on decorating documents rather than being the documents. It is possible, as Joshua Allen noted, to create "identity transforms" which create something else which is then decorated with CSS, but the CSS selectors model doesn't assume transformation in the sense of XSLT, creating a new document from an old one. CSS selectors let you paint additional presentation information onto an XML document without modifying its structure. There are costs to that approach - you can't sort a list or table, or perform computations - but there are also some substantial benefits. When linking documents, you don't need to worry that the target of a link will evaporate in the transformation used to present it. When scripting documents, you don't need to worry about whether you're addressing an XML element or some (potential multiple or zero) derivative of that element. Decoration has less power but also avoids some of the hairier situations created by the use of that power. For a lot of common document and even data formatting situations, CSS is both adequate and easier. For the creation of SVG documents or typesetting with XSL-FO, the decoration approach isn't enough, and then I suggest people use higher-power tools, like XSLT. I just can't bring myself to believe that using XSLT to generate (X)HTML from XML is necessary or useful in cases where mere decoration is all that's needed. Simon St.Laurent Associate Editor O'Reilly & Associates, Inc.
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|
|||||||||

Cart








