OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: from XML+CSS to HTML only

[ Lists Home | Date Index | Thread Index ]
  • From: Peter Murray-Rust <peter@ursus.demon.co.uk>
  • To: <xml-dev@xml.org>
  • Date: Fri, 26 May 2000 14:43:36 +0100

At 10:59 AM 5/26/00 +0200, debenedetti wrote:
>I know this seems an overwhelming task but..... is there any kind of
standard,
>product, easily summonable divinity that can output formatted HTML from an
XML+CSS
>input?
>
>thanks,
>
>stefano debenedetti

I have a related, but different requirement, so I'll try to answer yours.

My approach is to create format-free HTML and then apply CSS to it through
a browser (this is what is regarded as good style by the W3C.) For example
I always pass HTML through Dave Raggett's excellent tidy program. Any
specific formatting (e.g. <font>, <color>, etc. ends up in a <style>
element whose content is CSS. I can, if I wish, extract the <style> into a
separate *.css file. So if your question is "how can I use CSS to insert
<font>, <color> into my HTML", it's regarded as a Bad Thing To Do! The
result of your exercise should be an HTML file, with appropriate class
attributes on stylable elements, and a separate CSS element (either in the
<head> or a separate file).

The next question is "which elements do you wish your CSS to refer to?" -
the final HTML elements or the initial XML elements? If the former, then
you simply transform your XML into HTML by whatever stylesheet transform
you wish. If the latter, you will need a user agent which applies CSS to
XML and outputs HTML. I don't think there is a standard way of doing this,
but I think IE5 can do something here.

My own question is how can I transform HTML+CSS into XSL-FO? the point of
this is to be able to print the HTML in the same format as appears on the
screen (without using the print button). It requires:
	- an XHTML2FO.xsl
	- a CSS2FO.* (not XSLT since CSS is not XML)
OR:
	- CSS2XML.* and CSS-XML2FO.xsl [Does the first exist? it would be useful
to deal with CSS without having to write yet another parser. And it could
be important for microparsing SVG attributes.]

and some means of combining the results.

CSS and FO have a lot of communality but I don't know how far it goes.

I asked on FOP-DEV whether there was an XHTML2FO.xsl and apparently not. 

	P.


***************************************************************************
This is xml-dev, the mailing list for XML developers.
To unsubscribe, mailto:majordomo@xml.org&BODY=unsubscribe%20xml-dev
List archives are available at http://xml.org/archives/xml-dev/
***************************************************************************




 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS