NOTE -- If you have any problems with validation make sure you are using the latest file first before reporting any error --
This is a schema file designed to simplify the creation and modification of SC2Layout files for Starcraft 2. It unlocks numerous intellisense features in your XML editor of including, but not limited to:
Enumerations for the "type" attribute belonging to the Frame element
All known child elements for Frames
Intellisense for element attributes
Enumerations for a number of known element attributes
Error reporting
Using this schema in Visual Studio:
---------------------------------
- Download the SC2Layout.txt file
- Rename SC2Layout.txt to SC2Layout.xsd
- Copy the file to C:\<Visual Studio install path>\Xml\Schemas (eg. C:\Program Files (x86)\Microsoft Visual Studio 10.0\Xml\Schemas)
- Run Visual Studio
- Create a new XML file by going to the menu File > New > File or using the CTRL+N shortcut.
- You should have a new file containing <?xml version="1.0" encoding="utf-8"?>
- Open and close a root node called Desc.
- To the root node add the attribute xmlns="http://www.hiveworkshop.com/SC2Layout.xsd"
That's it. You should end up with a file that looks like this:
<?xml version="1.0" encoding="utf-8"?>
<Desc xmlns="http://www.hiveworkshop.com/SC2Layout.xsd">
</Desc>
This schema validates 99.99% of the time against all original Stacraft 2 SC2Layout files. The only invalid cases are due to 1 or 2 case inconsistencies that I consider errors on the part of the original files.
Even though this validates correctly it does not mean it is 100% complete. There are most likely (I have found one) a few Frame child elements which the original files do not make use of and whos exsistance I am unaware of. If you discover any additional elements that I do have listed, please send me a private message and I will update the schema.
In order spit out errors during editing when invalid values are used a lot of the element attributes have specific types they are validated against. However, for a lot of the less commonly used attributes, the schema allows for any value, even though the SC2 client may be looking for specific types. If you run into any of these cases, please send me a private message with an accurate description of the attribute's valid values and I will update the schema.
Keywords:
Starcraft2 Layout SC2Layout UI GUI User Interface Schema XML