XSLT 2.0 and XPath 2.0 Programmer's Reference, 4th Edition (674 page)

BOOK: XSLT 2.0 and XPath 2.0 Programmer's Reference, 4th Edition
7.26Mb size Format: txt, pdf, ePub
(the default) for no normalization.
An alternative approach is to make sure that individual text nodes, attribute nodes, and so on are already normalized in the result tree. You can do this by calling the
normalize-unicode()
function, described in Chapter 13, whenever you construct a character string that might not already be normalized.
omit-xml-declaration
If this attribute has the value
yes
, the serializer will not output an XML declaration (or, by implication, a text declaration; recall that XML declarations are used at the start of the document entity, and text declarations are used at the start of an external general parsed entity). If the attribute is omitted, or has the value
no
, then a declaration will be output. The declaration will include both the
version
and
encoding
attributes (to ensure that it is valid both as an XML declaration and as a text declaration). It will include a
standalone
attribute only if
standalone
is set to
yes
or
no
.
If you select an encoding such as
iso-8859-1
and omit the XML declaration, the output may be unintelligible to an XML parser. Nevertheless, the specification allows you to omit it, because there are sometimes alternative ways for an XML parser to determine the encoding. (Also, you might want to serialize several chunks of XML separately and then combine them using a text editor.)
standalone
If this attribute is set to
yes
, then the XML declaration will specify
standalone=“yes”
. If it is set to
no
, then the XML declaration will specify
standalone=“no”
. If the attribute is omitted, or is set to the value
omit
, then the XML declaration will not include a
standalone
attribute. This will make it a valid text declaration, enabling its use in an external general parsed entity.
This attribute should not be used unless the output is a well-formed XML document.

Other books

The Tin Horse: A Novel by Janice Steinberg
Fragile Spirits by Mary Lindsey
Implosion by Elliott, John
The Silver Chalice by Thomas B. Costain
Contact Imminent by Kristine Smith
The Shelter Cycle by Peter Rock
The Icarus Hunt by Timothy Zahn
Autumn by Edwards, Maddy