QA


Q&A

Q.

Why bother with XSLT when I can just use CSS to create style sheets for XML documents?

A.

If all you need to do is simply display the content in an XML document, CSS may in fact be your best option. However, XSLT allows you to process XML content and gives you a fine degree of control over what content is displayed and the order in which it appears. So, even though XSLT doesn't directly play a role in formatting documents for display, it provides a considerable amount of indirect control when it comes to isolating data, sorting data (numerically or alphabetically, for example), and performing calculations on data within XML documents.

Q.

How can there be separate namespaces for XSLT and XSL-FO if they are both part of XSL?

A.

XSLT and XSL-FO have different namespaces because they are different languages. Keep in mind that each of these technologies is implemented as an XML-based markup language. Because it is possible to use the two technologies independently of one another, they occupy separate namespaces. You can certainly use both XSLT and XSL-FO in the same XSL style sheet, in which case you would declare both namespaces with their own prefixes. For the time being, however, you will likely create XSL style sheets using only XSLT, in which case you can refer to the style sheet as an XSLT style sheet.




Sams Teach Yourself XML in 24 Hours
Sams Teach Yourself XML in 24 Hours, Complete Starter Kit (3rd Edition)
ISBN: 067232797X
EAN: 2147483647
Year: 2005
Pages: 266

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net