In the last article, we grouped assertions into rules. As you know, each rule has its own context that it acts upon. So, grouping assertions into a rule provides a way to organize assertions that apply to the same elements. In this article, we'll start by explaining patterns, which takes organization to a new level.
Schematron Patterns and Validation - Conclusion (Page 4 of 4 )
These articles have covered more than enough of Schematron to enable you to create a functional schema. Of course, there's more to Schematron than has been covered in these two articles.
However, thankfully, there's not too much more. One of the great things about Schematron is that it's not horribly complex and difficult to master. Rather, it allows for the creation of very powerful schema using only a few elements.
Also, as was noted earlier, Schematron doesn't have to serve as a replacement for other grammar-based schema languages. Rather than trying to use Schematron to recreate functionality that's provided by other schema languages, Schematron can be used in conjunction with another language to add additional functionality, enabling different types of constraints to be defined.
For example, the structure of a document can be defined using a schema language such as XML Schema. Then, constraints dealing with relationships and so forth can be defined quite effortlessly using Schematron.
From here, you can begin to use Schematron for your own applications, or you can continue to explore more functionality provided by the language. But don't forget to come back here next week for the conclusion to this article series!
DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.