ogc.opensearchgeo.1.0.tests.result-searchbytime.rnc Maven / Gradle / Ivy
# -*- rnc -*-
# Test Purpose: Verify that the server conforms to the Temporal Search conformance class.
namespace os = "http://a9.com/-/spec/opensearch/1.1/"
namespace s = "http://purl.oclc.org/dsdl/schematron"
namespace local = ""
namespace time = "http://a9.com/-/opensearch/extensions/time/1.0/"
include "../schemas/time.rnc"
include "../schemas/osdd.rnc"{
undefinedAttribute = attribute * - (local:* | time:* ) { text }
# Redefine the Simple Extension to exclude geo:* and time:* elements
simpleExtensionElement = element * -
( os:* ) { text }
# Redefine the Structured Extension to exclude geo:* and time:* elements
structuredExtensionElement = element * -
( os:* ) {
(attribute * { text }+,(text|anyElement)*)
| (attribute * { text }*, (text?, anyElement+, (text|anyElement)*))}
osDocument = [
s:pattern [ name="Check for Atom Url template"
s:rule [ context = "os:OpenSearchDescription"
s:assert [ test = "os:Url[@type='application/atom+xml']"
"An OpenSearch Description Document must have a Url template with "
~ " type of ATOM document." ]]]
s:pattern [ name="Check for time parameter"
s:rule [ context = "os:OpenSearchDescription"
s:assert [ test = "os:Url[@type='application/atom+xml'][substring-before(@template,'{time:start')!='']"
"An OpenSearch Description Document must have at least a time:start parameter "
~ " in the ATOM response." ]]]
]
element os:OpenSearchDescription { osDocumentConstruct }
}
# EOF