QA


Q&A

Q.

Are there any limitations regarding the use of literals in an XSLT style sheet?

A.

Yes. Because XSLT style sheets are coded in XML, everything in them must adhere to the syntax rules of XML. This applies to literals as well, which means that tags must be nested properly, start tags must have end tags, and so on.

Q.

What happens to nodes in an XML document that aren't matched by a template in an XSLT style sheet?

A.

If nodes in a document aren't matched by a template in an XSLT style sheet, those nodes aren't processed or transformed. Keep in mind that it isn't necessary for a style sheet to address every single piece of information in an XML document; it's perfectly acceptable to pick out highly specific information from a document if so desired. The degree to which document content is processed is entirely dependent on each specific application of XSLT.

Q.

Are there any other functions I can use with XSLT beyond the standard functions mentioned in this hour?

A.

Yes. There are several other standard XSLT functions that weren't covered in this hour; you can learn more about them by visiting the XSLT page at the W3C web site, which is located at http://www.w3.org/TR/xslt. Additionally, XSLT supports the inclusion of extended functions in different implementations of XSLT. For example, a web browser vendor could add browser-specific functions to their implementation of XSLT. You'll have to check with the specific browser you are targeting to see if extended XSLT functions are supported.

Q.

In regard to an XSLT style sheet, what happens if a document doesn't validate against a DTD/XSD schema?

A.

If a document doesn't validate against a provided schema, a web browser will still apply the style sheet and display the document. However, if the document isn't well formed, the style sheet is never processed and the document isn't displayed.




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