1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-05 22:20:24 -08:00
emacs/etc/schema/dotnet-slnx.rnc
Jostein Kjønigsen 6b42b974ce 'nxml-mode': add schema for .NET SLNX files.
SLNX is a new XML-based file-format for .NET based solutions, replacing
the older proprietary SLN file-format.

Unlike SLN-files, it is merge-friendly and expected to become the new
de-facto standard for working with .NET projects.  This commit adds
support for SLNX-schema to 'nxml-mode'.

The schme provided has been synthesized using the official XSD-schema
definition:
https://github.com/microsoft/vs-solutionpersistence/blob/main/src/Microsoft.VisualStudio.SolutionPersistence/Serializer/Xml/Slnx.xsd

This schema was then converted to RNG using XSDtoRNG.xsl:
https://github.com/epiasini/XSDtoRNG

The RNG schema was then converted to RNC using the trang CLI-tool:
https://relaxng.org/jclark/trang.html

* etc/schema/dotnet-slnx.rnc: New file.
* etc/schema/schemas.xml: Add Slnx schema.

* lisp/files.el (auto-mode-alist): Add association for SLNX files.
(Bug#79379)
2025-09-06 12:27:29 +03:00

74 lines
2.1 KiB
Text

default namespace = ""
namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0"
namespace ns_1 = "http://relaxng.org/ns/compatibility/annotations/1.0"
namespace rng = "http://relaxng.org/ns/structure/1.0"
start |= starting_Solution
starting_Solution =
element Solution {
(element Configurations { Configurations }?
| element Project { Project }*
| element Folder { Folder }*
| PropertiesGroup*)*,
attribute Description { xsd:string }?,
attribute Version { xsd:string }?
}
Configurations =
(element BuildType {
attribute Name { xsd:string }
}*
| element Platform {
attribute Name { xsd:string }
}*
| element ProjectType { ProjectType }*)*
ProjectType =
(ConfigurationRulesGroup*)*,
attribute TypeId { xsd:string }?,
attribute Name { xsd:string }?,
attribute Extension { xsd:string }?,
attribute BasedOn { xsd:string }?,
[ ns_1:defaultValue = "true" ] attribute IsBuildable { xsd:boolean }?,
[ ns_1:defaultValue = "true" ]
attribute SupportsPlatform { xsd:boolean }?
Folder =
(element File {
attribute Path { xsd:string }
}*
| element Project { Project }*
| PropertiesGroup*)*,
attribute Name { xsd:string }
Project =
(element BuildDependency {
attribute Project { text }
}*
| ConfigurationRulesGroup*
| PropertiesGroup*)*,
attribute Path { xsd:string },
attribute Type { xsd:string }?,
attribute DisplayName { xsd:string }?
PropertiesGroup =
element Properties {
element Property {
attribute Name { xsd:string },
attribute Value { xsd:string }?
}*,
attribute Name { text },
attribute Scope { text }?
}
ConfigurationRulesGroup =
element BuildType {
attribute Solution { xsd:string }?,
attribute Project { xsd:string }?
}+
| element Platform {
attribute Solution { xsd:string }?,
attribute Project { xsd:string }
}+
| element Build {
attribute Solution { xsd:string }?,
attribute Project { xsd:string }?
}+
| element Deploy {
attribute Solution { xsd:string }?,
attribute Project { xsd:string }?
}+