XSpec error
Posted: Sat Mar 12, 2022 12:14 am
Hi, I'm struggling a bit with an error produced running an XSpec on my Schematron. The Schematron runs successfully against an instance, but when I run the XSpec it errors out: "XPDY0002: The context item for axis step root/Document is absent." I have isolated this to a variable defined in the pattern that selects an element value from the instance being validated:
$statusFilter then gets used in another variable where the error actually pops up. When I make $statusFilter just a sequence of string values (@value="'stable','deprecated'"), the XSpec runs. I've attached the items in question (just unzip and fix the RegistryPath var as appropriate), any help would be appreciated. (let me know if the attachment didn't work - couldn't tell if it did or not).
Code: Select all
<sch:let name="statusFilter" value=" if(//status = ('production','sample'))
then ('stable','deprecated') else ('unstable','stable','deprecated') " />