raffazizzi / vscode-sxml

Scholarly XML. VSCode extension with features typically needed by academic encoding projects.
MIT License
29 stars 4 forks source link

Support for PreTeXt documents #29

Open oscarlevin opened 1 year ago

oscarlevin commented 1 year ago

I am the developer of the pretext-tools extension, which provides tools for working with PreTeXt documents. These are XML with a particular schema, so your sxml extension is of great interest. Instead of forking your project and integrating parts directly into pretext-tools, I wonder if it would make more sense to contribute to vscode-sxml directly to provide the flexibility I would need to require it by pretext-tools (I hope I have that language right).

Here are the features that I would love to see implemented (and would be happy to work on myself):

Would love to hear your thoughts on these ideas.

StevenClontz commented 1 year ago

There are a few XML/XSLT "scholarly" users related to the PreTeXt/Runestone projects that Zoom weekly on Tuesdays and Fridays. This looks like a cool project @raffazizzi and you'd be very welcome to join us to talk shop and maybe discuss this issue further. https://prose.runestone.academy/#upcoming-events has info - Oscar and I join those regularly, or we can find another time to chat if you're interested.

raffazizzi commented 1 year ago

Hello @oscarlevin and @StevenClontz thanks for reaching out! I would be happy to talk more, I could drop in for the Friday meeting if that helps (I can join at the start around 3pm Eastern but would need to leave by 4pm ET).

Some quick reponses:

  • Support for the ptx language (which is really xml, but pretext-tools defines a new "language" recognized on the file extension .ptx). So some way to start validation for such files.

Do you expect that this would be mostly about loading a default schema for certain file types? If yes, that would be fine, though I may want to start doing this with other extensions too such as .odd (for TEI file documentation), .mei (for MEI files) etc.

  • The ability to specify the schema used universally, rather than included at the top of each file. Perhaps on a project level, but of course, respecting the current behavior for xml files that have the schema referenced in the file.

Sounds good. We should looks at XML Catalogs for this.

It's much needed in a lot of my projects and work with students, so yes :)

  • Use of snippet-like behavior for completions. No idea how easy/hard this is, but it would be great if the completion suggestions were for more complex snippets that were provided by pretext-tools (in the case of ptx files; otherwise snippets specified for xml by the user).

OK. It would be good for TEI as well. It shouldn't be too hard to provide them as commands from the Command Palette

StevenClontz commented 1 year ago

I'll be at the Zoom drop-in at 3 Eastern this week, but Oscar has his head around this better than I do. When will you be around @oscarlevin?

oscarlevin commented 1 year ago

I'll be there as well. This is exciting.