oulan bator said:
I don't think CSS is dead, and that XSL stands right for what I need to
do. I know how to handle XSL in java (it is built in since 1.4 IMHO)
I'm not saying CSS is dead; in fact, W3C is actively working on CSS3.
I'm just saying that the W3C also recommends that you do NOT use CSS to
format XML data, and that you DO use XSL to format it (as indicated in the
link I made in another post in this thread).
I went to the javadocs,
http://java.sun.com/j2se/1.5.0/docs/api/index.html, and did a search for
"XSL", and found zero results. Where do you see XSL support built into Java?
I was wondering that CSS is a powerfull yet simple way to customize
rendering (in HTML and in MathML presentation too). Is there a generic
library that can parse any XML file, find style data (maybe we can help
parser to find styles), parse style data, AND apply CSS rules.
Applying CSS rules to a document only makes sense in the context where
you want to DISPLAY the document. In other words, it does not make sense to
apply CSS to the in-memory tree-like representation of an XML document. The
CSS language, for example, allows you to place conditionals on the style
rules depending on whether the document should be displayed on screen, or on
paper, something which cannot possibly known before the time comes to
actually print or display the document.
Once we have a better idea of what you are doing to display your MathML
documents (because I'm pretty sure MathML is not built into Java either), we
might be able to further advise you with regards to CSS, but my initial
claim still stands:
You'll get more support using XSL to manipulate the presentation of XML
documents than you will with CSS.
- Oliver