DeltaXML / vscode-xslt-tokenizer

VSCode extension for highlighting XSLT and XPath (upto 3.0/3.1)
MIT License
46 stars 4 forks source link

VSCode extension XSLT/XPath fails to auto tag-close #138

Open pgfearo opened 2 months ago

pgfearo commented 2 months ago

Copied from DeltaXML's Support Portal:

VSCode on Ubuntu 24.04. auto tag-close works fine with RedHad XML extension for VSCode, but not with XSLT/XPath.

pgfearo commented 2 months ago

Is this a problem when you're editing XSLT or just general XML?

If this occurs when editing XSLT please supply an XSLT file with a missing tag that can't be auto-closed so I can reproduce this issue. If this occurs when editing general XML, it's possible RedHat's auto tag-close is conflicting with DeltaXML's XSLT/XPath extension (or vice-versa).

Please note, by design, DeltaXML's XSLT/XPath extension only performs an auto-tag-close when '</' is typed. Completing a start-tag does not trigger the auto tag-close.

rolfschumacher commented 2 months ago

Thanks for responding pfearo. I will try to give more details, but I do not know the best way to write about xml files in Markdown.

The problem is the same when editing XML with the XSLT/XPath editor, but it shows up to me, when editing XSLT, e.g. the simple file test.xsl:

test.txt

(I renamed it to test.txt, as github would not accept .xsl as file extension)

I was expecting that </example> is automatically inserted when I type the > of <example>. But nothing happened. When I go on an type </ I was expecting that VSCode automatically completes the closing tag to </example>. But nothing happened.

In the meantime I have installed VSCode with XSLT/XPath extension to Win11. I miss the expected behavior of the XSLT/XPath editor there as well.

pgfearo commented 2 months ago

I've created a .xsl test file from your test.txt attached file. This is the behaviour I get:

  1. When I type the > of <example> no auto close-tag is inserted as you expected. This is actually by design because I find it annoying to undo the close-tag for the many cases where I don't want to close the tag immediately.
  2. When I go on to type </ I get the </example> close-tag inserted automatically as I would expect, but you are not seeing the same behaviour.

To resolve (2) to see if this is caused by another extension you've installed, please could you try your example in a new workspace but after disabling all extensions in that workspace and then enabling just the DeltaXML XSLT/XPath extension? (There's a 'disable all installed extensions for this workspace' command that should help).

rolfschumacher commented 3 weeks ago

Sorry for answering late. I changed to a different project with a different laptop, win10. And have the same issue. XSLT/XPath is - afaics - the only installed and enabled extension to VSCode. And I get no auto close offer with your 2. method as you do. What could be different?