Errata


This page contains errors and corrections in Schematron: A language for validating XML. If you find an error in the book, please send email to publisher@xmlpress.net that describes what the error is and where in the book you found it. Errata are shown in the table in chronological order, with the newest items added at the top of the table.

Edition Location Description Status Date Found by
1st Chapter 2, Introduction to Schematron, Example 2.6 (page 18 in the print edition) The <assert> test should use the variable $article-code instead of directly referencing the attribute @code.

<schema xmlns=http://purl.oclc.org/dsdl/schematron queryBinding="xslt3">

  <let name="department-code" value="/inventory-list/@depcode"/>

  <pattern>
    <rule context="article">

      <let name="article-code" value="@code"/>

      <assert test="starts-with($article-code, $department-code)">
        The article code (<value-of select="$article-code"/>) must start with the right
        prefix (<value-of select="$department-code"/>)
        for <value-of select="name"/>
      </assert>
    </rule>
  </pattern>
</schema>
Confirmed May 30, 2023 Danny MacMillan
1st Chapter 3, Example 3.3 description (page 25 in the print edition) Point 3 under Example 3.3 should read (<contents> instead of <content>):

The content description in the <contents> element must be at least five characters long.

Confirmed May 30, 2023 Danny MacMillan
1st Chapter 1, the section titled “The oXygen IDE” and Chapter 4, the section titled “IDE based Schematron validation” (pages 6 and 35 in the print edition) In both places, replace the sentence: As far as I know, the only IDE currently available (2022) that supports Schematron this way is oXygen. with:

As far as I know there is currently (2023) one other IDE that also supports Schematron validation in the editor: XMLBlueprint (https://www.xmlblueprint.com/).

Confirmed May 30, 2023 Erik Siegel
1st Appendix A, Example A.21 (page 171 in the print edition) In Example 1.21 /message/ should be /messages/:

/messages/*[@default eq 'true']/message

Confirmed May 30, 2023 Danny MacMillan
1st Appendix A, Figures A9, A10, A11 (pages 171–172 in the print edition) The titles of all three begin with /*/messages. They should begin with /messages/*. Confirmed May 30, 2023 Danny MacMillan
1st Appendix A, Examples A.22–26 (pages 173–174 in the print edition) All four examples start with /message/*. They should start with /messages/* instead. Confirmed May 30, 2023 Danny MacMillan
1st Appendix A, Example A.27 (page 175 in the print edition) The test attribute in the <assert> element includes an extra closing parenthesis. The test should be:

test="string-length(.) lt 25"

The second bullet point after Example A.27 has the same problem.

Confirmed May 30, 2023 Danny MacMillan
1st Appendix A, second bullet point after Example A.27 (page 175 in the print edition) The predicate at the end of this bullet point starts with /message/". It should be /messages/":

/messages/*[@color eq 'red'][1]/message
Confirmed May 30, 2023 Danny MacMillan