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
8.19Mb 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 Case of the Blonde Bonanza by Erle Stanley Gardner
A Spoonful of Poison by M. C. Beaton
My Black Beast by Randall P. Fitzgerald
The Fountainhead by Ayn Rand
Un antropólogo en Marte by Oliver Sacks
A Rush of Wings by Kristen Heitzmann
Bloodshot by Cherie Priest
Emprise by Michael P. Kube-McDowell