ebooksgratis.com

See also ebooksgratis.com: no banners, no cookies, totally FREE.

CLASSICISTRANIERI HOME PAGE - YOUTUBE CHANNEL
Privacy Policy Cookie Policy Terms and Conditions
Schematron - Wikipedia, the free encyclopedia

Schematron

From Wikipedia, the free encyclopedia

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 simple and powerful structural schema language. It typically uses XPath to describe patterns.

Contents

[edit] Advantages

Because of its rule-based nature, Schematron's specificity is very strong. It can require that the content of an element be controlled by one of its siblings. It can, also, request or require that the root element, regardless of what element that happens to be, have specific attributes. It can even specify required relationships between multiple XML files.

[edit] Uses

Because of its simple, lightweight design and reuse of existing XML standards such as XPath, Schematron can be used for many purposes. Some of these include the following areas.

[edit] Adjunct to Structural Validation

Schematron can be used as an adjunct to DTDs, RELAX NG or XML Schema. It allows co-occurrence constraints, non-regular constraints, and inter-document constraints.

[edit] Lightweight Business Rules Engine

Schematron is used to express lightweight business rules. Schematron is not a full heavyweight Rete rules engine but can be used to express rules about complex structures with an XML document.

[edit] XML Editor Syntax Highlighting Rules

XML Editors use Schematron rules to conditionally highlight XML files for errors.

[edit] History

Schematron was invented by Rick Jelliffe. He described Schematron as "a feather duster to reach the parts other schema languages cannot reach".

[edit] Schematron as an ISO Standard

Schematron has been standardized to become part of 
ISO/IEC 19757 - Document Schema Definition Languages (DSDL) - Part 3: Rule-based validation - Schematron.

[edit] Namespace Standard

Any files that use ISO/IEC FDIS 19757-3 should use the following namespace:

http://purl.oclc.org/dsdl/schematron

[edit] Sample Rule

Schematron rules are very simple to create using a standard XML editor or XForms application. The following is a sample rule:

<schema xmlns="http://purl.oclc.org/dsdl/schematron">
   <pattern name="Contract date must be in the past">
      <rule context="Contract">
         <assert test="ContractDate &lt; current-date()">ContractDate must be in the past.</assert>
      </rule>
   </pattern>
</schema>

This rule checks to make sure that the ContractDate XML element has a date that is before the current date. If this rule fails the validation will fail and an error message which is the body of the assert element will be returned to the user.

[edit] Implementation

Schematron source files are usually transformed into XSLT files (using XSLT) and placed in an XML Pipeline. This allows workflow process designers to build and maintain rules using standard XML manipulation tools.

For example an Apache Ant task can be used to convert Schematron rules into XSLT files.

[edit] See also

[edit] External links

Languages


aa - ab - af - ak - als - am - an - ang - ar - arc - as - ast - av - ay - az - ba - bar - bat_smg - bcl - be - be_x_old - bg - bh - bi - bm - bn - bo - bpy - br - bs - bug - bxr - ca - cbk_zam - cdo - ce - ceb - ch - cho - chr - chy - co - cr - crh - cs - csb - cu - cv - cy - da - de - diq - dsb - dv - dz - ee - el - eml - en - eo - es - et - eu - ext - fa - ff - fi - fiu_vro - fj - fo - fr - frp - fur - fy - ga - gan - gd - gl - glk - gn - got - gu - gv - ha - hak - haw - he - hi - hif - ho - hr - hsb - ht - hu - hy - hz - ia - id - ie - ig - ii - ik - ilo - io - is - it - iu - ja - jbo - jv - ka - kaa - kab - kg - ki - kj - kk - kl - km - kn - ko - kr - ks - ksh - ku - kv - kw - ky - la - lad - lb - lbe - lg - li - lij - lmo - ln - lo - lt - lv - map_bms - mdf - mg - mh - mi - mk - ml - mn - mo - mr - mt - mus - my - myv - mzn - na - nah - nap - nds - nds_nl - ne - new - ng - nl - nn - no - nov - nrm - nv - ny - oc - om - or - os - pa - pag - pam - pap - pdc - pi - pih - pl - pms - ps - pt - qu - quality - rm - rmy - rn - ro - roa_rup - roa_tara - ru - rw - sa - sah - sc - scn - sco - sd - se - sg - sh - si - simple - sk - sl - sm - sn - so - sr - srn - ss - st - stq - su - sv - sw - szl - ta - te - tet - tg - th - ti - tk - tl - tlh - tn - to - tpi - tr - ts - tt - tum - tw - ty - udm - ug - uk - ur - uz - ve - vec - vi - vls - vo - wa - war - wo - wuu - xal - xh - yi - yo - za - zea - zh - zh_classical - zh_min_nan - zh_yue - zu -