Re: [xsl] How to add styling to the HTML using XSL

Subject: Re: [xsl] How to add styling to the HTML using XSL
From: jeroen@xxxxxxxx
Date: Wed, 25 May 2011 10:04:45 +0200
Basically, there are two ways to include CSS in HTML documents.

My preference is to have one big section in the header that collects all the elements (you could generate a separate CSS output document instead). This can be achieved by using a special mode ("cssmode") to generate CSS rules within that section. Generate a unique Id for the element, and use CSS id matching to link the generate CSS with the generated element. This method I use (with some optimizations to avoid generating multiple identical CSS rules) in my tei2html scripts (on Google code).

Easier is just to use the style attribute of HTML, but this is frowned upon by some CSS/HTML purists.


Quoting Sanjaya Liyanage <sanjayacl@xxxxxxxxx>:


     I want to position an element in the HTML as specified in the XML
using XSLT.

          <textBox top="20" left="30"/>


   I want to position the text box in the HTML as 20px from top and
30px from left.Using CSS this can be done.But Is there any way that
XSL can help to figure this out?Any idea would be great.

Thank you

Current Thread