|
As long as Tom Gaven has given the RELAX NG version of your WXS, it might be useful to look at the ASN.1 version. It is not as compact as RELAX NG, but is certainly more compact than the WXS version and, in my opinion, much easier to understand. It encodes the same XML as the WXS or RELAX NG versions.
Xml-deviant DEFINITIONS AUTOMATIC TAGS ::=
BEGIN
IMPORTS
Date
FROM XSD;
XML-Deviant ::= [NAME AS "XML-Deviant"] SEQUENCE {
firstSubscribed [ATTRIBUTE] Date OPTIONAL,
mailReader [ATTRIBUTE] XSD.String OPTIONAL,
numPosts INTEGER OPTIONAL,
signature CHOICE {
nil BOOLEAN (TRUE) ,
signature XSD.String} ,
email XSD.String OPTIONAL}
XML-Deviant-derivations ::= [USE-TYPE] CHOICE {
xML-Deviant XML-Deviant,
dareObasanjo DareObasanjo }
DareObasanjo ::= SEQUENCE {
firstSubscribed Date,
mailReader XSD.String("Microsoft Outlook") OPTIONAL,
numPosts INTEGER,
signature XSD.String,
email XSD.String}
END
|