namespace sa = "http://apstandard.com/ns/1" grammar { start = Application AnyElement = element * { (attribute * { text } | text | AnyElement)* } DefinedByAspect = AnyElement Requirement = DefinedByAspect UrlHandler = DefinedByAspect Permission = DefinedByAspect Setting = element sa:setting { attribute id { text }, attribute global { "true" }?, attribute installation-only { "true" }?, element sa:name { attribute xml:lang { text }?, xsd:string }*, element sa:description { attribute xml:lang { text }?, xsd:string }*, element sa:error-message { attribute xml:lang { text }?, xsd:string }*, ( ( attribute type { "boolean" }, attribute default-value { xsd:boolean }? ) | ( attribute type { "string" | "password" }, attribute min-length { xsd:nonNegativeInteger }?, attribute max-length { xsd:nonNegativeInteger }?, (attribute regex { xsd:string } | attribute charset { xsd:string })?, attribute default-value { xsd:string }? ) | ( attribute type { "integer" }, attribute min { xsd:integer }?, attribute max { xsd:integer }?, attribute default-value { xsd:integer }? ) | ( attribute type { "float" }, attribute min { xsd:float }?, attribute max { xsd:float }?, attribute default-value { xsd:float }? ) | ( attribute type { "email" }, attribute default-value { xsd:string }? ) | ( attribute type { "domain-name" }, attribute default-value { xsd:string }? ) | ( attribute type { "enum" }, attribute default-value { text }?, element sa:choice { attribute id { text }, element sa:name { attribute xml:lang { text }?, text }* }+ ) ) } SettingGroup = element sa:group { element sa:name { attribute xml:lang { text }?, xsd:string }*, Setting+ } Requirements = element sa:requirements { element sa:choice { element sa:requirements { attribute id { text }, Requirement+ }+ }*, Requirement* } SubMapping = element sa:mapping { attribute url { text }, (attribute path { xsd:string { minLength = "1" } } | attribute virtual { "virtual" })?, (UrlHandler|Permission)*, SubMapping* } Mapping = element sa:mapping { attribute url { text }, (attribute path { xsd:string { minLength = "1" } } | attribute virtual { "virtual" }), (UrlHandler|Permission)*, SubMapping* } Application = element sa:application { element sa:name { text }, element sa:packager-uri { xsd:anyURI }?, element sa:version { text }, element sa:release { text }, element sa:homepage { xsd:anyURI }?, element sa:package-homepage { xsd:anyURI }?, element sa:default-prefix { text }?, element sa:summary { attribute xml:lang { text }?, text }*, element sa:description { attribute xml:lang { text }?, text }*, element sa:icon { attribute path { text } }?, element sa:screenshot { attribute path { text }, element sa:description { attribute xml:lang { text }?, text }+ }*, # Either URL or file and name of license are allowed. element sa:license { attribute must-accept { xsd:boolean }, element sa:text { attribute xml:lang { text }?, element sa:name { text }?, ( element sa:url { xsd:anyURI } | element sa:file { text }) }+ }?, element sa:configuration-script-language { text }?, # Upgrades and patches specification # Versions which may be patched by this package ( # Any version starting from the specified element sa:patchable-from { attribute version { text }, attribute release { text } } | # Explicit versions enumeration element sa:patches { attribute version { text }, attribute release { text } }+ )?, # Versions which may be upgraded by this package ( # Any version starting from the specified element sa:upgradable-from { attribute version { text }, attribute release { text } } | # Explicit versions enumeration element sa:upgrades { attribute version { text }, attribute release { text } }+ )?, element sa:changelog { element sa:version { attribute version { text }, attribute release { text }, element sa:entry { attribute xml:lang { text }?, text }+ }* }, element sa:entry-points { element sa:entry { element sa:path { xsd:anyURI }, element sa:label { attribute xml:lang { text }?, text }+, element sa:description { attribute xml:lang { text }?, text }* }+ }?, element sa:installed-size { xsd:nonNegativeInteger }?, element sa:categories { element sa:category { text }+ }?, element sa:languages { element sa:language { xsd:string { pattern = "[a-z]{2,3}" } }+ }?, element sa:settings { Setting*, SettingGroup* }, Requirements, Mapping } }