Schematron validation [message #6885] |
Sat, 20 January 2007 17:02  |
Eclipse User |
|
|
|
Originally posted by: elena.tibrea.gmail.com
<sch:rule context="sm:relationships">
<sch:let name="x" value="count(sm:relation)"/>
<sch:assert test="false()">
<sch:value-of select="count(ancestor)"/>
<!-- <sch:value-of select="$x"/> -->
</sch:assert>
</sch:rule>
|
|
|
Re: Schematron validation [message #6910 is a reply to message #6885] |
Sat, 20 January 2007 17:07   |
Eclipse User |
|
|
|
Originally posted by: elena.tibrea.gmail.com
Sorry for my previous post...
The questions I have are:
a) can we use axes like parent, ancestor in assert, in order to access
attribute of parents for example ?
<sch:rule context="sm:relationships">
<sch:assert test="false()">
<sch:value-of select="count(ancestor)"/>
</sch:assert>
</sch:rule>
In this case it prints out 0.
b)can we use valiables?
<sch:rule context="sm:relationships">
<sch:let name="x" value="count(sm:relation)"/>
<sch:assert test="false()">
<sch:value-of select="$x"/>
</sch:assert>
</sch:rule>
For this, I get a runtime error:
org.apache.xml.utils.WrappedRuntimeException: Could not find variable with
the name of x
java.lang.NullPointerException
at
org.eclipse.cosmos.rm.validation.internal.smlvalidators.Sche matronValidator.transform(SchematronValidator.java:319)....
Thanks.
|
|
|
|
Re: Schematron validation [message #568927 is a reply to message #6885] |
Sat, 20 January 2007 17:07  |
Eclipse User |
|
|
|
Originally posted by: elena.tibrea.gmail.com
Sorry for my previous post...
The questions I have are:
a) can we use axes like parent, ancestor in assert, in order to access
attribute of parents for example ?
<sch:rule context="sm:relationships">
<sch:assert test="false()">
<sch:value-of select="count(ancestor)"/>
</sch:assert>
</sch:rule>
In this case it prints out 0.
b)can we use valiables?
<sch:rule context="sm:relationships">
<sch:let name="x" value="count(sm:relation)"/>
<sch:assert test="false()">
<sch:value-of select="$x"/>
</sch:assert>
</sch:rule>
For this, I get a runtime error:
org.apache.xml.utils.WrappedRuntimeException: Could not find variable with
the name of x
java.lang.NullPointerException
at
org.eclipse.cosmos.rm.validation.internal.smlvalidators.Sche matronValidator.transform(SchematronValidator.java:319)....
Thanks.
|
|
|
|
Powered by
FUDForum. Page generated in 0.02427 seconds