用schematron验证xml错误
同样的xml使用其他验证方式都行 用schematron就出现下面的错误 (都是书本的资源 没错误 )
false Invalid schematron : Failed to compile stylesheet. 1 error detected.
以下为xml 和 sch代码
<?xml version="1.0" encoding="UTF-8"?>
<?schematron path="Library-1.sch"?>
<library>
<book id="ACMAS-20" publishedDate="1920" genre="Detective Fiction">
</book>
<book id="EGOSC-77" publishedDate="1977" genre="Science Fiction">
</book>
</library>
<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.ascc.net/xml/schematron">
<pattern name="book attributes">
<rule context="book">
<assert test="@id">The 'book' element must have an 'id' attribute.</assert>
<assert test="@publishedDate">The 'book' element must have a 'publishedDate'
attribute.</assert>
<assert test="@genre">The 'book' element must have a 'genre' attribute.</assert>
</rule>
</pattern>
</schema>