-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
205 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 16 additions & 6 deletions
22
ph-schematron-pure/src/test/resources/external/issues/github170/schematron.sch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,22 @@ | ||
<schema xmlns="http://purl.oclc.org/dsdl/schematron" queryBinding="xpath2"> | ||
<pattern> | ||
<rule context="/xml"> | ||
<let name="stringVar" value="'foo'"/> | ||
<assert role="ERROR" test="$stringVar eq 'bar'">error message</assert> | ||
</rule> | ||
<rule context="/xml/owner"> | ||
<let name="booleanVar" value="1 eq 1"/> | ||
<assert role="ERROR" test="$booleanVar eq true()">error message</assert> | ||
<let name="stringVar" value="'foo'"/> | ||
<let name="booleanVar" value="1 eq 1"/> | ||
<let name="booleanVar2" value="true()"/> | ||
<let name="numVar" value="123"/> | ||
<let name="doubleVar" value="12.345"/> | ||
<let name="listVar" value="(1,2,3)"/> | ||
<let name="nodeVar" value="."/> | ||
<let name="nodeSetVar" value="//owner"/> | ||
<assert role="ERROR" test="$stringVar = 'bar'">error message</assert> | ||
<assert role="ERROR" test="$booleanVar = false()">error message</assert> | ||
<assert role="ERROR" test="$booleanVar2 = false()">error message</assert> | ||
<assert role="ERROR" test="$numVar = 17">error message</assert> | ||
<assert role="ERROR" test="$doubleVar = 3.14">error message</assert> | ||
<assert role="ERROR" test="$listVar = (1, 2)">error message</assert> | ||
<assert role="ERROR" test="$nodeVar = ..">error message</assert> | ||
<assert role="ERROR" test="$nodeSetVar = ../owner">error message</assert> | ||
</rule> | ||
</pattern> | ||
</schema> |