I want to build a full xml website.. Which should I choose to render it..xsl or css? Then, I have a problem with links... How could i put links?
CSS or XSL
what do u mean by a XML website?? You mean an XHTML website??
XSLT is not used as a substitute for CSS : never. XSLT is used to actually modify an XML file into another XML file. Let's say... converting ATOM feeds to XHTML in a particular scenario bound by certain rules which are defined in your XSLT document.
It's more commonly used to convert XML database records to HTML but in concept, it is meant to be used to convert one type of XML document into another.
XSLT is not used as a substitute for CSS : never. XSLT is used to actually modify an XML file into another XML file. Let's say... converting ATOM feeds to XHTML in a particular scenario bound by certain rules which are defined in your XSLT document.
It's more commonly used to convert XML database records to HTML but in concept, it is meant to be used to convert one type of XML document into another.
A full xml site... that could be just a well formed xhtml document, served as text/xml or application/xhtml+xml, right?
xhtml is, by its essence, a xml document itself. You can just use css to present your site.
Just be careful that IE6 doesn't (and I think that IE7 doesn't either) support application/xhtml+xml mime type, so you'll have to use Content Negotiation to serve your document as real xhtml for browsers that support it, and text/html for IE.
xhtml is, by its essence, a xml document itself. You can just use css to present your site.
Just be careful that IE6 doesn't (and I think that IE7 doesn't either) support application/xhtml+xml mime type, so you'll have to use Content Negotiation to serve your document as real xhtml for browsers that support it, and text/html for IE.
Use XSL, it was built for displaying styled XML data.
CSS was built for styling HTML, unless you are meaning XHTML?
XSL Is a little bit more tricky than CSS though, mainly because you are styling VERY raw data. But if you insist on a 100% XML website, xsl is your best bet.
http://www.w3schools.com/xsl
CSS was built for styling HTML, unless you are meaning XHTML?
XSL Is a little bit more tricky than CSS though, mainly because you are styling VERY raw data. But if you insist on a 100% XML website, xsl is your best bet.
http://www.w3schools.com/xsl
| -Jordan- wrote: |
| Use XSL, it was built for displaying styled XML data.
CSS was built for styling HTML, unless you are meaning XHTML? XSL Is a little bit more tricky than CSS though, mainly because you are styling VERY raw data. But if you insist on a 100% XML website, xsl is your best bet. http://www.w3schools.com/xsl |
XSL doesn't style XHTML, it just transforms it into another type of an XML document. Now, we say styling when we refer to XSLT is because with XSLT we generally transform normal XML pages to XHTML [now, XHTML too is a type of an XML document] and then view the transformed XML document [which is our XHTML page] in an application known as a 'browser' which can understand the XHTML page.
CSS can perfecly style raw XML documents...
To add links in your XML files, use XLink.
To add links in your XML files, use XLink.
I prefer XSL to use in XML because it is far more flexible than CSS. 
| Ranfaroth wrote: |
| CSS can perfecly style raw XML documents...
To add links in your XML files, use XLink. |
But xlink is not supported by major browsers...
It's supported by gecko browsers...
Though, I dont know XML much .. CSS is fun in most cases, a little easier I think ?
Right now, I am learning the essence of HTML and moving on to CSS so that I wouldn't have to use DreamWeaver any more
I think you shud stick to CSS , like i do
Right now, I am learning the essence of HTML and moving on to CSS so that I wouldn't have to use DreamWeaver any more
I think you shud stick to CSS , like i do
use CSS, its easier and better supported by browsers
| rohan2kool wrote: |
| XSL doesn't style XHTML |
Yes it does.
| Quote: |
| it just transforms it |
No, it can also transform it.
| Quote: |
| Now, we say styling when we refer to XSLT is because with XSLT we generally transform normal XML pages to XHTML |
We rarely say styling when we refer to XSLT - XSLT is a subset of XSL which is preoccupied with Transformation of a document. Like you say. However, transformation is not styling.
XSL is a family of tools, consisting of XSLT, XPath and XSL-FO. And XSL-FO is a (more powerful) CSS equivalent expressed in XML.
| Code: |
| <store>
<fruits> <fruit type="apple">Granny Smith</fruit> <fruit type="apple">Some other apple</fruit> <fruit type="orange">Seville</fruit> </fruits> <beverages> <beverage type="vodka">Stolichnaya</beverage> </beverages> </store> |
| Code: |
| <xsl:template match="fruits">
<fo:block font-weight="bold"> <xsl:apply-templates/> </fo:block> </xsl:template> <xsl:template match="fruit[@type='apple']"> <fo:block background-color="green"> <xsl:apply-templates/> </fo:block> </xsl:template> <xsl:template match="fruit[@type='orange']"> <fo:block background-color="orange"> <xsl:apply-templates/> </fo:block> </xsl:template> |
That's XSL, and that's styling.
That said, yes, unless your XML (and no, it doesn't have to be XHTML in order to style it) is very complex, use CSS. Simpler and more widely supported - and both are recommended by W3C.
| Quote: |
| CSS is easy to learn then xslt.CSS is uaed to format HTML.
XSLT is used to format XML.XSLT is not used as a substitute for CSS : never. XSLT is used to actually modify an XML file into another XML file. just take in to account that old browser dont support XSLT and css(external) |
