![JAR search and dependency download from the Maven repository](/logo.png)
xml.xproc.set-xml-declaration.xpl Maven / Gradle / Ivy
Sets, or deletes, the xml declaration of a file. If `xml-declaration` is the empty string, the xml declaration will be deleted. It is an error if `xml-declaration` does not match the regex
`^<\?xml[ \t\r\n]+version[ \t\r\n]*=[ \t\r\n]*(''1\.[0-9]+''|"1.[0-9]+")([ \t\r\n]+encoding[ \t\r\n]*=[ \t\r\n]*(''[A-Za-z][A-Za-z0-9._-]*''|"[A-Za-z][A-Za-z0-9._-]*"))?([ \t\r\n]+standalone[ \t\r\n]*=[ \t\r\n]*(''(yes|no)''|"(yes|no)"))?[ \t\r\n]*\?>$`.
The result port will contain a `c:result` document with the URI to the file as its text node.
A document containing the URI to the file, same as the output of a `p:store` operation.
URI to the file you want to set the xml declaration of.
The xml declaration.
The encoding to use when reading and writing from and to the file (default: 'utf-8').
© 2015 - 2025 Weber Informatics LLC | Privacy Policy