XML output headers

The ability to output XML documents, including XSL and XHTML files, is very important. There are a number of features in XSLT for controlling how these files are identified by their initial markup constructs, as in the following example:

<?xml version="1.0" encoding="ISO-8859-1"
                                   standalone="yes"?>
<!DOCTYPE book PUBLIC "-//myCorp//DTD My DTD//EN"
                      "book.dtd" >

The Output element has a number of attributes that control whether or not these tags are output, and what values their respective parameters will take.

XML declaration

The Omit XML Declaration attribute can be given the value 'yes' to prevent the declaration being created in the output file. When this attribute is not used (or is explicitly given the value 'no'), the declaration is output, and three other attributes are used to set its parameter values. The Version attribute needs to be given the value '1.0' for XML output. The Encoding attribute holds the character set encoding, such as 'ISO-8859-1'. Finally, the Standalone attribute holds the value 'yes' or 'no':

<output method='xml' version='1.0' encoding='ISO-8859-1'
                                   standalone='yes' />

Document type declaration

If the output document conforms to an externally held DTD, then the document type declaration needs to contain either a public identifier, a system identifier or both. The Doctype Public and Doctype System attributes hold the respective parameter values:

<output type='xml' ...
        doctype-public='-//myCorp//DTD My DTD//EN'
        doctype-system='book.dtd' />

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.21.34.0