XSLT stylesheet
What goes wrong in XSLT stylesheet
The 3 errors this corpus records against XSLT stylesheet documents, keyed by the message your parser printed. Nothing here is written for this page — each error declares the formats it bites, and this is that declaration read the other way round.
Start with the message you were given
Every entry below states the message our validator emits, verbatim, and a test asserts it still does. If you are holding a broken document rather than a question, XML validator will tell you which of these you have.Parse errors · 3
These stop the document being read at all. Nothing downstream sees a file with one of them, because it is not XML.
- Comment not terminated
Comment not terminated (line 3)A comment was opened with <!-- and never closed, so the rest of the file is swallowed as comment text and the reported line is the end, not the fault. - Processing instruction not terminated
ParsePI: PI target never end ... (line 2)A processing instruction was opened with <? and never closed with ?>. Everything after it is consumed as instruction data until the file runs out. - Double hyphen within comment
Double hyphen within comment: <!-- a (line 2)XML forbids -- inside a comment's body, even when the comment is otherwise closed properly. It is one of the specification's genuinely surprising rules.
Back to XSLT stylesheet — root element, namespaces, constraints and a worked example.
Get started
Bring order to the XML your team can't afford to ignore.
Create a free account and get a private workspace to search, validate, diff, and monitor your XML feeds, sitemaps, schemas, and vendor integrations.