Das SVRL-Schema

(Auszug aus "Schematron - Effiziente Business Rules für XML-Dokumente", Kapitel 9)

Die Struktur eines SVRL-Dokumentes ist relativ übersichtlich gehalten. Im Folgenden stellen wir nun alle Elemente sowie deren Attribute vor:

Grafische Darstellung des SVRL-Schemas

Abbildung: Grafische Darstellung des SVRL-Schemas

Hier nun noch das dazugehörige Schema aus dem RELX NG-Standard in kompakter Syntax:

#
#   (c) International Organization for Standardization 2005.
#   Permission to copy in any form is granted for use with conforming
#   SGML systems and applications as defined in ISO 8879,
#   provided this notice is included in all copies.
#
default namespace = "http://purl.oclc.org/dsdl/svrl"
schematron-output = element schematron-output {
attribute title { text }?,
attribute phase { xsd:NMTOKEN }?,
attribute schemaVersion { text }?,
human-text*,
ns-prefix-in-attribute-values*,
(active-Pattern,
(fired-rule, (failed-assert | successful-report)*)+)+
}
# only namespaces from sch:ns need to be reported
ns-prefix-in-attribute-values = element ns-prefix-in-attribute-values {
attribute prefix { xsd:NMTOKEN },
attribute uri { text },
empty
}
# only active patterns are reported
active-pattern = element active-pattern {
attribute id { xsd:ID }?,
attribute name { text }?,
attribute role { xsd:NMTOKEN }?,
empty
}
# only rules that are fired are reported
fired-rule =
element fired-rule {
attribute id { xsd:ID }?,
attribute context { text },
attribute role { xsd:NMTOKEN }?,
attribute flag { xsd:NMTOKEN }?,
empty
}
# only references are reported, not the diagnostic
diagnostic-reference = element diagnostic-reference {
attribute diagnostic { xsd:NMTOKEN },
human-text
}
# only failed assertions are reported
failed-assert = element failed-assert {
attlist.assert-and-report,
diagnostic-reference*,
human-text
}
# only successful asserts are reported
successful-report = element successful-report {
attlist.assert-and-report,
diagnostic-reference*,
human-text
}
human-text = element text { text }
attlist.assert-and-report = attribute id { xsd:ID }?,
attribute location { text },
attribute test { text },
attribute role { xsd:NMTOKEN }?,
attribute flag { xsd:NMTOKEN }?
start = schematron-output

   

<< zurück vor >>

 

 

 

Tipp der data2type-Redaktion:
Zum Thema Schematron bieten wir auch folgende Schulungen zur Vertiefung und professionellen Fortbildung an:

Copyright © dpunkt.verlag GmbH 2011
Für Ihren privaten Gebrauch dürfen Sie die Online-Version ausdrucken. Ansonsten unterliegt dieses Kapitel aus dem Buch "Schematron - Effiziente Business Rules für XML-Dokumente" denselben Bestimmungen, wie die gebundene Ausgabe: Das Werk einschließlich aller seiner Teile ist urheberrechtlich geschützt. Alle Rechte vorbehalten einschließlich der Vervielfältigung, Übersetzung, Mikroverfilmung sowie Einspeicherung und Verarbeitung in elektronischen Systemen.

dpunkt.verlag GmbH, Ringstraße 19B, 69115 Heidelberg, fon 06221-14830, fax 06221-148399, hallo(at)dpunkt.de