• Complain

Erik Siegel - Schematron: a language for validating XML

Here you can read online Erik Siegel - Schematron: a language for validating XML full text of the book (entire story) in english for free. Download pdf and epub, get meaning, cover and reviews about this ebook. year: 2022, publisher: XML Press, genre: Home and family. Description of the work, (preface) as well as reviews are available. Best literature library LitArk.com created for fans of good reading and offers a wide selection of genres:

Romance novel Science fiction Adventure Detective Science History Home and family Prose Art Politics Computer Non-fiction Religion Business Children Humor

Choose a favorite category and find really read worthwhile books. Enjoy immersion in the world of imagination, feel the emotions of the characters or learn something new for yourself, make an fascinating discovery.

Erik Siegel Schematron: a language for validating XML
  • Book:
    Schematron: a language for validating XML
  • Author:
  • Publisher:
    XML Press
  • Genre:
  • Year:
    2022
  • Rating:
    4 / 5
  • Favourites:
    Add to favourites
  • Your mark:
    • 80
    • 1
    • 2
    • 3
    • 4
    • 5

Schematron: a language for validating XML: summary, description and annotation

We offer to read an annotation, description, summary or preface (depends on what the author of the book "Schematron: a language for validating XML" wrote himself). If you haven't found the necessary information about the book — write in the comments, we will try to find it.

Schematron()[Siegal][9781937434809]

Erik Siegel: author's other books


Who wrote Schematron: a language for validating XML? Find out the surname, the name of the author of the book and a list of all author's works by series.

Schematron: a language for validating XML — read online for free the complete book (whole text) full work

Below is the text of the book, divided by pages. System saving the place of the last page read, allows you to conveniently read the book "Schematron: a language for validating XML" online for free, without having to search again every time where you left off. Put a bookmark, and you can go to the page where you finished reading at any time.

Light

Font size:

Reset

Interval:

Bookmark:

Make
Schematron A Language for Validating XML Erik Siegel - photo 1
Schematron
A Language for Validating XML
Erik Siegel
Chapter 1 Preface Computer systems proce - photo 2
Chapter 1 Preface Computer systems process read exchange and spit out data - photo 3
Chapter 1. Preface

Computer systems process, read, exchange, and spit out data like the contents of this book, your tax form, electronic health records, social media messages, and much more. All such computer data must be in some kind of well-defined format, so it can be understood and processed correctly.

Computer data formats can be organized into families, according to the ground rules they follow. This is analogous to natural languages. In the western world we have a limited character set (A-Z, sometimes a few more), and we write from left to right. Other language families, for example Chinese, have a much more extended character set and a different writing orientation. If you speak a western language but dont understand French, you cant comprehend text in French, but you can still recognize constructs from the Western language family, such as characters, words, sentences, and paragraphs. For Chinese that will be much more difficult.

Computer data format families work the same way. Examples of data format families include EDI, CSV, JSON, and XML. Each has its own syntax rules, application domains, pros, cons, and fan club. And just as a French person and a Swedish person cannot easily communicate, even though their languages are in the same family, a computer system that talks XML language A cannot understand XML language B. People and computers both can perceive familiar language constructs, but they cannot understand what the other person/computer is saying unless they know the specific language being used.

In the natural language world we can sometimes partly solve that communication problem with a little improvisation, such as sign language or gestures. However, for computers thats not so easy. What goes in and what comes out must be correct and understandable. The process of establishing this correctness for computer data is called validation .

Validation is usually done in phases:

  • First the data is checked to see whether it follows the language-family ground rules.
  • Then checks are done to determine whether its in the correct language and follows the grammar of that language.
  • And, optionally, business rules are checked to determine whether the data makes sense.

compares these phases for natural and computer languages:

Table 1.1 Comparison of natural versus computer language validation
CheckNatural languageComputer language
Language family ground rulesDoes it use only allowed characters? Are these characters organized into words? Is punctuation used correctly? Are sentences organized into paragraphs, etc.?Does it uses only allowed characters? Are data elements delimited correctly? Are things grouped correctly, etc.?
Language grammar checkAre the words spelled correctly? Are the verbs conjugated correctly? Is the word order as expected for this language, etc.?Is the data recognizable? Are all data elements there? Are numbers written as numbers, dates as dates, etc. Are all required data elements present, etc.?
Business rules checkDoes it have an introductory paragraph? Do numbers, if any, make sense? Is the authors name spelled correctly, etc.?Is this date before that date? Is the sum of this set of numbers not more than some threshold? Is the value of this data element present in that external database table, etc.?

The rules for computer data checks can be expressed in special formal computer languages called validation languages . Validation languages allow the computer system to validate whether the data it consumes or produces is correct and valid . Schematron, the subject of this book, is about validating XML, so lets focus on that.

  • For XML, checking the ground rules of the language family is an absolute precondition for any subsequent checks. An XML document that passes this stage is called well-formed .
  • To check grammar you can choose from several XML validation languages. The most common ones are DTD, W3C XML Schema, and RELAX NG. If this stage is passed, an XML document is called valid .
  • Schematron is a validation language that checks business rules. A set of checks written in the Schematron language is called a Schematron schema . Theres no official name for a document that passes this stage, but lets call it Schematron valid .

This process of validating XML documents is explained in much more detail in .

A Schematron schema consists (mostly) of assertions. A simple example would be that, somewhere in an XML document, a given start date must always be before a given end date. You can write such an assertion in the Schematron language and then validate that its true for your data. If not, some error message is produced.

This book explains how to create Schematron schemas and use them to check XML data for compliance with your business rules.

1.1. Who is this book for?

This book is for anyone who wants to learn Schematron or expand their existing knowledge of the language.

I assume you have at least a basic knowledge of XML. That is, you know roughly what documents, elements, and attributes are, and you have seen data formatted like before:

Example 1.1 An example XML document (schematron-book-code/data/invoices.xml)

Or like :

Example 1.2 Another example XML document (schematron-book-code/data/text.xml)

Hello Schematron!

If the examples above look like complete gibberish, this book is probably not for you. But if you know your way around XML at this level, read on.

In writing this book, I assumed that Schematron is used by a wide variety of people with a broad range of backgrounds. Some will be XSLT or XQuery programmers. Some will previously have written schemas in other languages like W3C XML Schema, or RELAX NG. Others will be less tech-savvy or newer to the XML world. This book tries to explain Schematron for both XML aficionados and people who are less experienced. I assume a basic familiarity with XML. A little programming experience helps but is not strictly necessary. If your experience fits this profile, basic Schematron should be no problem.

For those that want to go beyond basics, theres also a lot to be gained. Schematron schemas can do amazing things, like combining data from many sources or even digging into databases. You can mix it with programming languages like XSLT, unleashing all the power these languages provide. This book will teach you how to do this.

If, after reading the above, you think Schematron might be interesting but are still a little unsure, please jump ahead to . This will provide you with an example of basic Schematron usage. Hopefully this will give you a good picture.

Next page
Light

Font size:

Reset

Interval:

Bookmark:

Make

Similar books «Schematron: a language for validating XML»

Look at similar books to Schematron: a language for validating XML. We have selected literature similar in name and meaning in the hope of providing readers with more options to find new, interesting, not yet read works.


Reviews about «Schematron: a language for validating XML»

Discussion, reviews of the book Schematron: a language for validating XML and just readers' own opinions. Leave your comments, write what you think about the work, its meaning or the main characters. Specify what exactly you liked and what you didn't like, and why you think so.