redhat-developer / redhat-developer/vscode-xml
Element name 'mode' is invalid for XSLT 3 stylesheet.
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 328
- Forks
- 101
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 7
Description
I'm not 100% sure where this error is even coming from, but I have this plugin installed for XML support, so this is the most likely culprit.
I'm using the latest VS Code on Windows 10. I load an XSLT stylesheet that starts like this:
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text"/>
<xsl:mode on-no-match="fail"/>
In my editor xml:mode is underlined; the error says:
Element name 'mode' is invalid.
One of the following is expected:
- declaration
- variable
- param
- WC[##other:"http://www.w3.org/1999/XSL/Transform"]
Error indicated by:
{http://www.w3.org/1999/XSL/Transform}
with code: xml(cvc-complex-type.2.4.a)
I'm pretty sure this is valid XSLT 3. Perhaps the plugin is using an outdated schema definition for XSLT 2.x? How can we get this updated? I would file a pull request, but I don't have the faintest idea where this would be defined.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No file or test is named in the report. Start by loading the supplied XSLT example and tracing the plugin's schema-validation entry point; done means the XSLT 3 xsl:mode declaration with on-no-match is accepted without the invalid-element diagnostic.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- xml
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100