|
In markup languages, Schematron is a rule-based validation language for making assertions about the presence or absence of patterns in XML trees. It is a structural schema language expressed in XML using a small number of elements and XPath. In a typical implementation, the Schematron schema XML is processed into normal XSLT code for deployment anywhere that XSLT can be used. Schematron is capable of expressing constraints in ways that other XML schema languages like XML Schema and DTD cannot. For example, it can require that the content of an element be controlled by one of its siblings. Or it can request or require that the root element, regardless of what element that is, must have specific attributes. Schematron can also specify required relationships between multiple XML files. Constraints and content rules may be associated with "plain-English" validation error messages, allowing translation of numeric Schematron error codes into meaningful user error messages. The current ISO recommendation is the ''ISO Schematron of 2006'' (ISO/IEC FDIS 19757-3). == Uses == Constraints are specified in Schematron using an XPath-based language that can be deployed as XSLT code, making it practical for applications such as the following: ;Adjunct to Structural Validation: By testing for co-occurrence constraints, non-regular constraints, and inter-document constraints, Schematron can extend the validations that can be expressed in languages such as DTDs, RELAX NG or XML Schema. ;Lightweight Business Rules Engine: Schematron is not a comprehensive, Rete rules engine, but it can be used to express rules about complex structures with an XML document. ;XML Editor Syntax Highlighting Rules: Some XML editors use Schematron rules to conditionally highlight XML files for errors. Not all XML editors support Schematron. 抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)』 ■ウィキペディアで「Schematron」の詳細全文を読む スポンサード リンク
|