Computed processing instruction constructors
A computed processing instruction constructor creates a processing instruction node for which the content of the node is computed based on an enclosed expression.
The result of a computed processing instruction constructor is a new processing instruction node that has its own node identity.
Syntax
- processing-instruction
- A keyword that indicates that a processing instruction node will be constructed.
- PITarget
- An NCName that represents the name of the processing application to which the processing instruction is directed. This name must conform to the format for NCNames that is specified by Namespaces in XML.
- PIContentExpression
- An expression that generates the content of the processing instruction
node. During processing, atomization is applied to the result of PIContentExpression,
and each atomic value in the resulting sequence is cast to a string. The individual
strings that result from the cast are concatenated with an intervening space
character. Leading whitespace is removed, and the concatenated string becomes
the content of the processing instruction node. If atomization results in
an empty sequence, the sequence is replaced by a zero-length string. The content
sequence cannot contain the string "
?>
".
Example
The following computed constructor creates
the processing instruction <?audio-output beep?>
:
processing-instruction audio-output {"beep"}