> I'm researching about half a dozen CMS's for a project, and
> thought I had found my answer with Lenya. I thought I could use
> xml for my source documents (content), and xsl/xslt for
> transformation (presentation), but I keep seeing references to
> CSS's, and sometimes scripting languages. In fact, Lenya doc's
> say, "as much as possible we use css's for presentation". I
> thought xslt was an improvement over CSS's. Why have xslt
> available and then use CSS's?  Is it that you can't do 
> "presentation" with xslt? I'm guessing there must be a reason
> to use CSS's. Can someone give me a quick overview of why CSS's
> are necessary?

Well, CSS is actually the part that does the presentation, while XSLT is the 
part that does the transformation of the basic XML into something you need, 
like HTML or XHTML in Lenya's most prominent example.  See, it kinda breaks 
down like this:

1.  Your data

Your data is in some standardized XML format.  That format could be just basic 
XML tags, or it could be part of a more standardized library of XML tags, like 
SVG, or RSS, or pretty much anything.

2.  Transformation of data

XSLT is great for transforming one bit of standard XML tags into another.  So, 
if you have an RSS file, you can use XSLT to transform that RSS into XHTML to 
be displayed as a webpage.  In the case of Lenya, you take the XML files used 
to store the data and transform it into a different structure: XHTML.  
Remember, this is only structure.  While you could certainly include font tags 
and other presentational HTML tags in your transformation using XSLT, the 
general guideline is to convert to strict semantic HTML markup: markup that 
describes the data in your webpage as best as possible, avoiding any tags or 
attributes that define the style of that content.

3.  Presentation

And this is where CSS jumps in.  Now that you've converted your XML data to 
semantically correct XHTML markup, you can use class="" or id="" attributes 
you've assigned to your XHTML tags to create CSS that defines how that piece of 
content on your page will be displayed.  So, if you have a paragraph tag 
created in number 2 above, you can now have a CSS file that defines a 
paragraph's style as indented and having a bottom margin of 10 pixels.


Hopefully that gives a detailed overview of the ideal way you want to be using 
the technologies available for use in Lenya, and specifically the role of CSS.  
Feel free to keep posting questions on your possible use of Lenya.

Jon

<<winmail.dat>>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to