Tags
Errors
- Content is not allowed in prolog
02 Jul 2026
The XML parser found characters before the XML declaration or root element: usually a UTF-8 BOM, stray whitespace/text, or a file that is not XML at all (an HTML error page, for instance).
- FODC0002
02 Jul 2026
doc() or document() could not load the requested document: wrong relative URI, missing file, or an environment (like an online tool) with no filesystem access.
- FORG0001
02 Jul 2026
A cast or constructor function received a value it cannot convert — casting text to a number or date is the usual suspect. Guard with 'castable as' or use number().
- FORX0002
02 Jul 2026
The pattern given to matches(), replace(), tokenize() or xsl:analyze-string is not a valid XPath regular expression — watch out for curly braces in attributes and unsupported constructs.
- Markup in the document following the root element must be well-formed
02 Jul 2026
There is content after the closing tag of the root element — usually two XML documents concatenated, or a fragment list without a wrapper element.
- SXXP0003
02 Jul 2026
A Saxon wrapper code: the source document failed to parse as XML. The real diagnosis is in the underlying parser message that follows the code.
- The entity name must immediately follow the '&'
02 Jul 2026
A raw ampersand appears in the XML. In XML, & always starts an entity reference — literal ampersands must be written as &, and only 5 named entities exist.
- XPDY0002
02 Jul 2026
An expression uses a relative path (./foo, foo/bar) in a place where there is no context node — typically inside xsl:function or a stylesheet-level variable.
- XPST0008
02 Jul 2026
An XPath expression references a variable that does not exist at that point: a typo, or a variable declared inside a block and used outside its scope.
- XPST0017
02 Jul 2026
Saxon cannot resolve a function call: the function name is unknown, the number of arguments is wrong, or the function belongs to a newer XSLT/XPath version than the one you selected.