teacup/schemas/taxonomy.rnc

69 lines
2 KiB
Text
Raw Normal View History

2021-12-15 11:29:23 +00:00
# Sanity check for taxonomies automatically generated from a SKOS RDF/XML source.
# Author: Andrew Sales
# Date: 20161220
# Version: 0.4
# Comments:
# 20161220 [AS] Added search relevance prologue
# 20180713 [MD] Added handling for <alternateIDs> and for facet/@suppress
# 20190709 [MD] Added facet/@role to flag 'contentType' facet
# 20200618 [MD] Added facet/@suppressInSearch
default namespace = ""
namespace rel = 'http://rdf.bloomsbury.com/ssp/search#relevance'
start =
element taxonomy {
attribute name { text },
attribute releaseDate { xsd:date },
attribute id { text }?,
xmlBase?,
search-relevance-prologue?,
facet+
}
facet =
element facet {
attribute behaviour { string 'subject' }?,
(attribute xml:id { xsd:ID } | attribute xref{ xsd:IDREF }),
attribute sortAs { string }?,
attribute role { string 'contentType' }?,
xmlBase?,
(browse-display-atts|search-display-atts|relevance-atts),
element names {
element name {
attribute level { xsd:NCName },
attribute xml:lang{ xsd:language }?,
text
}+
}?,
element alternateIDs {
element id {
attribute type { string },
text
}+
}?,
facet*
}
xmlBase = attribute xml:base{ xsd:anyURI }
browse-display-atts =
(attribute suppressInBrowse { xsd:boolean }|attribute suppress { xsd:boolean })?,
attribute displayHint {'alphaSorted'}?
search-display-atts =
attribute suppressInSearch { xsd:boolean }?
relevance-atts =
attribute rel:combinedMatchOnly{ xsd:boolean }?,
attribute rel:matchCombination{ xsd:IDREFS }?,
attribute rel:minimumMatchLevel{ xsd:int }?,
attribute rel:minimumMatches{ xsd:int }?
#defines the relevance of search results
search-relevance-prologue =
element rel:relatedContent{
element rel:ranking {
attribute type{ string 'relevance' }?,
facet+
}
}