3 ms·
I would definitely use RelaxNG for specifying schemas instead of XSD - it's simpler both to read and write in every case I've tried, and the resulting schema is
by spiralx 8y ago
I would definitely use RelaxNG for specifying schemas instead of XSD - it's simpler both to read and write in every case I've tried, and the resulting schema is smaller as well, often by a lot.
<element name="addressBook">
<zeroOrMore>
<element name="card">
<attribute name="name">
<text/>
</attribute>
<attribute name="email">
<text/>
</attribute>
</element>
</zeroOrMore>
</element>
http://www.relaxng.org/tutorial-20011203.html http://www.relaxng.org/tutorial-20011203.html
Plus there's a non-XML "compressed" version as well:
element addressBook {
element card {
element name { text },
element email { text }
}+
}
But I agree that XML like you posted is nasty, it's no harder to write
<parameter name="ApplicationName">WhizBang</parameter>
instead if you need generic parameters, or
<ApplicationName>WhizBang</ApplicationName>
if not.