Parses the contents of a processing instruction.
get-pseudo-attribute($att as xs:string) ➔ xs:string?
The name of the pseudo-attribute required
Requires Saxon-PE or Saxon-EE.
Notes on the Saxon implementation
Available since before Saxon 8.0. Revised in Saxon 10 to follow the W3C rules for the xml-stylesheet processing instruction.
This function parses the contents of a processing instruction (supplied as the context
item) whose content follows the conventional attribute="value" structure (as defined for
<?xsl-stylesheet?> processing instruction). The context should be
a processing instruction node; the function returns the value of the pseudo-attribute
named in the first argument if it is present, or an empty sequence otherwise.
If the attribute value contains a sequence of characters in the form of an XML
character reference, for example
, this is parsed and converted
into the corresponding character.
The function throws a dynamic error (SXCH0005) if the supplied string does not follow the syntax for pseudo-attributes given in Associating Style Sheets with XML documents 1.0 (Second Edition).
Although intended for parsing processing instructions, the function will actually parse the string value of the context item whatever it might be. Earlier Saxon releases did not throw an error if the input syntax was invalid.