Returns a new processing instruction node, with given name and content.
new-processing-instruction($name as xs:string, $content as xs:string?) ➔ processing-instruction()
The name of the new processing instruction
The content of the new processing instruction
Notes on the Saxon implementation
Available since Saxon 10.
This function constructs a new parentless processing instruction node.
The name of the processing instruction is determined by the first argument. This must
be an instance of
xs:string that conforms to the rules for an
xs:NCName; it must not match the name "xml" in a case-blind comparison.
The content of the processing instruction (that is, the string value of the node) is formed by evaluating the second argument. If this is an empty sequence, the string value will be a zero-length string.
Any substring of the string value that matches
?> is replaced by
? > (that is, a space is inserted).
If the function is called twice with the same arguments, it is unpredictable whether it returns the same node or different nodes from the two invocations.