default namespace sa = "http://apstandard.com/ns/1" namespace local = "" grammar { start = Application Application = element application { ## Version of APS format used attribute version { text }?, ## Packaging date attribute packaged { xsd:dateTime }?, element name { text }, element version { text }, element release { text }, element homepage { xsd:anyURI }?, element vendor { element name { attribute xml:lang { text }?, text }+, element homepage { attribute xml:lang { text }?, xsd:anyURI }*, element icon { attribute path { text } }? }?, element packager { element name { attribute xml:lang { text }?, text }+, element homepage { attribute xml:lang { text }?, xsd:anyURI }*, element icon { attribute path { text } }?, element uri { xsd:anyURI }? }?, element presentation { element summary { attribute xml:lang { text }?, text }*, element description { attribute xml:lang { text }?, text }*, element icon { attribute path { text } }?, element screenshot { attribute path { text }, element description { attribute xml:lang { text }?, text }+ }*, element changelog { element version { attribute version { text }, attribute release { text }, attribute date { xsd:dateTime }?, element entry { attribute xml:lang { text }?, text }+ }* }?, element categories { element category { text }+ }?, element languages { element language { xsd:string { pattern = "[a-z]{2,3}" } }+ }?, element extension { AnyElement* }? }?, element global-settings { ( Setting | SettingGroup )* }?, element patch { attribute match { text }, attribute recommended { "true" }? }?, element upgrade { attribute match { text } }?, element content { ContentDeliveryMethod }?, Service* } AnyElement = element * { attribute * { text }*, ( text | AnyElement)* } ## Update version and release Version = attribute version { text }, attribute release { text } VersionRecommended = Version, attribute recommended {"true"}? ContentDeliveryMethod = DefinedByAspect ## Services Service = element service { attribute id { text }?, attribute class { "account" | "service" | "ecommerce" | text }?, ( element license { EULA } | element license-info { ProductCode } )?, element presentation { Presentation }?, element settings { ( Setting | SettingGroup )* }?, ## Requirements specification [5.4.4] element requirements { element choice { element requirements { attribute id { text }, Requirement+ }+ }*, Requirement* }?, element provision { element when-chosen { attribute requirements-id { text }, ProvisionMethod+ }*, ProvisionMethod+ }?, Service* } ## End-user license agreement EULA = ( attribute must-accept { xsd:boolean }, ( element free { empty } | element commercial { empty } )?, element text { attribute xml:lang { text }?, element name { text }?, ( element url { xsd:anyURI } | element file { text } ) }+ ) # Product license identifier ProductCode = element product-code { xsd:string { minLength = "1" } } ## GUI-related settings Presentation = ## Textual description of the service element name { attribute xml:lang { text }?, text }*, element summary { attribute xml:lang { text }?, text }*, element icon { attribute path { text } }?, ## Informational link specification [5.2.2] element infolinks { element link { attribute xml:lang { text }?, attribute class { "official" | "community" | "howto" | "support" | "demo" | text }?, attribute href { xsd:anyURI }, text }+ }?, element entry-points { element entry { attribute class { "control-panel" | "login" | "frontpage" | "check" | text }?, ## URI templates are allowed attribute dst { xsd:anyURI | text }?, attribute method { "GET" | "POST" | text }?, element label { attribute xml:lang { text }?, text }+, element description { attribute xml:lang { text }?, text }*, element icon { attribute path { text } }?, ## Optional parameters for using entry point element variable { attribute name { text }, attribute class { "login" | "password" | "locale" | text }?, attribute value-of-setting { text }?, text }*, element extension { AnyElement* }? }+ }?, element extension { AnyElement* }? ## Settings div { SettingGroup = element group { attribute class { "authn" | "presentation" | "web" | "vcard" | "type" | text }?, ## groups with name of @class "type" are used to ## express hCard subproperties # Due to XML Schema restrictions, distinct definitions were joined element name { attribute xml:lang { text }?, attribute class { "type" }?, text }*, ## Nested anonymous groups are allowed for the sake of ## microformats compliance ( SettingGroup | Setting )* } Setting = element setting { attribute id { text }, attribute class { text }?, ( attribute installation-only { "true" } | attribute track-old-value { "true" } )?, element name { attribute xml:lang { text }?, text }*, element description { attribute xml:lang { text }?, text }*, element error-message { attribute xml:lang { text }?, text }*, # Settings types ( ( attribute type { "boolean" }, attribute default-value { "true" | "false" }? ) | ( attribute type { "string" | "password" }, attribute min-length { xsd:nonNegativeInteger }?, attribute max-length { xsd:nonNegativeInteger }?, attribute default-value { text }?, ( attribute regex { text } | attribute charset { text } )? ) | ( 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 { text }? ) | ( attribute type { "domain-name" }, attribute default-value { text }? ) | ( attribute type { "enum" }, attribute default-value { text }?, element choice { attribute id { text }, element name { attribute xml:lang { text }?, text }* }+ ) | ( attribute type { "static-text" }, ( attribute default-value { text } | attribute value-of-setting { text } ) ) | ( attribute type { "hidden" }, ( attribute default-value { text } | attribute value-of-setting { text } ) ) ) } } Requirement = DefinedByAspect ## Aspect must use own namespace DefinedByAspect = element * - ( sa:* | local:* ) { attribute * { text }*, ( text | DefinedByAspect )* } ## Provision specification div { ProvisionMethod = element url-mapping { UrlMapping } | element configuration-script { ConfScript } | DefinedByAspect ## URL Mapping UrlMapping = element default-prefix { xsd:string { minLength = "1" } }?, element installed-size { xsd:nonNegativeInteger }?, element mapping { Mapping }* Mapping = attribute url { xsd:string { minLength = "1"} }, ( attribute path { xsd:string { minLength = "1" } } | attribute virtual { "virtual" } )?, DefinedByAspect*, element mapping { Mapping }* ## Configuration Script ConfScript = attribute name { text }, attribute privileged { "true" }?, ( element configuration-script-language { text } | element binary-executable { empty } ), element status-control { empty }? } }