[ALOY-1171] Add DTD or other view XML validation reference for Studio to use
| GitHub Issue | n/a |
|---|---|
| Type | Story |
| Priority | Medium |
| Status | Open |
| Resolution | Unresolved |
| Affected Version/s | n/a |
| Fix Version/s | n/a |
| Components | Documentation, Tooling |
| Labels | n/a |
| Reporter | Christopher Williams |
| Assignee | Tim Poulsen |
| Created | 2014-10-16T17:12:44.000+0000 |
| Updated | 2015-06-25T21:17:55.000+0000 |
Description
Studio is blissfully unaware of what tags are valid underneath other tags. We just offer the full set to the user. It'd be great if we had something like a DTD so we knew which tags are valid underneath others.
There are other cases where it'd be great to get the input from Alloy rather than Studio hard-code: i.e. "artificial" tags (tags that aren't real types, but may behave like other tags/types - LeftNavButton is not a type, but acts like a Button)
[~cwilliams] Do you want an actual DTD (XML schema) and if so, what format? Or would a JSON format, like a simplified version of http://docs.appcelerator.com/titanium/data/index.html meet your needs? What specific data would you need enumerated?
A Relax NG schema would be ideal. It's easy to read and easy to convert into a DTD or XML Schema. I agree with Chris Williams that validating the Alloy XML files is something you want to do to catch your errors before building. And currently in Studio when you choose Commands > XML > Validate Syntax, there's nothing to validate the XML *against*, Roger Sperberg