1 Replies - 636 Views - Last Post: 21 July 2012 - 12:26 AM

xslt in conjunction with xsl-fo or css

Posted 20 July 2012 - 10:11 PM

First of all I would like to make sure that I have the correct understanding of the difference between transformation and formatting. Transformation is adding e.g. a p tag around your text? Formatting is e.g. making the text red?

In my current cms project I've decided to have static content saved in xml files.

e.g.

<welcome_text>
Hello and welcome to LazyVulpes.com Here you can do stuff.
</welcome_text>

Implementing this text is fairly easy using xslt, but what if I want "LazyVulpes.com" to be a orange link?

Should my xml be something like this?

<welcome_text>
Hello and welcome to <link location="http://www.lazyvulpes.com/" color="orange">LazyVulpes.com</link> Here you can do stuff.
</welcome_text>

And if so, how do I add the a element and use xsl-fo to make the link text orange?

Also, what if I just want it to be orange and not a link, can I do this without adding any tags around it? If a tag is always required to add extra styling to a inline text, why use xsl-fo at all?

Is there any reason to use both xsl-fo and css? xsl-fo for formatting and css for positioning?