Appendix C. XSLT Reference

   

Style Sheet

An XSLT style sheet is an XML document. Its root element is an xsl:stylesheet where the xsl prefix is bound to http://www.w3.org/1999/XSL/Transform. Its main attribute is version , which, for the time being, must have the value "1.0" :

 <xsl:stylesheet      version="1.0"      xmlns:xsl=" http://www.w3.org/1999/XSL/Transform">      <!-- content deleted -->    </xsl:stylesheet> 

Output

One of the first elements within xsl:stylesheet should be xsl:output . xsl:output specifies how the processor should write the output. Note that the processor may elect to ignore this recommendation:

 <xsl:output method="xml"/> 

The most commonly used attributes are as follows :

  • method ”Its value can be xml , html , text , or another name . The method selects the formatter; for example, xml follows the XML syntax ( <BR/> ), whereas html follows the HTML syntax ( <BR> ).

  • encoding ”Controls the XML encoding; for example, UTF-8 , UTF-16 , ISO-8859-1 , and so on.

  • media-type ”Is the MIME type of the result; for example, text/xml , application/xml , text/plain , and so on.

  • omit-xml-declaration ”Controls whether the processor should output an XML declaration. The value is either yes or no .

   


Applied XML Solutions
Applied XML Solutions
ISBN: 0672320541
EAN: 2147483647
Year: 1999
Pages: 142

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