Saturday, November 20, 2010

How do I link a CSS with an XML document or can I change font and other attributes in a XSL?

I'm struggling to get my XML working if I want to attribute it to a CSS. Can you link a CSS to an XML, if so, where should you put the link.

OR can I change attributes in the XSL which I also have linked to it but at the moment it only has my table layout.

I don't know if this makes sense!! Please help!How do I link a CSS with an XML document or can I change font and other attributes in a XSL?
In the XSL, you can attach, import or put inline your CSS just like you would any other html page.

You do not format your XML. Make your life even easier, and use an XSLT page.How do I link a CSS with an XML document or can I change font and other attributes in a XSL?
they go hand in hand! xsl to re-write the xml into valid xhtml/html. and then css to do the pretty work of formatting.



A recipe I wrote in xml uses xsl with an external stylesheet and internal %26lt;style%26gt; tags!

http://jpassoc.com/Recipes/Pan%20Roast.x

uses

http://jpassoc.com/Recipes/recipeWWW.xsl

which uses has the styles! (the external css file is currently empty on that site, I use it for the development site!)_
You use XSLT to convert your XML document to HTML, then you use CSS to control the layout in the resulting HTML document.

No comments:

Post a Comment