Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » COSMOS » Schematron validation
Schematron validation [message #6885] Sat, 20 January 2007 17:02 Go to next message
Eclipse UserFriend
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 Go to previous messageGo to next message
Eclipse UserFriend
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 #6958 is a reply to message #6910] Mon, 22 January 2007 19:22 Go to previous message
Sheldon Lee-Loy is currently offline Sheldon Lee-LoyFriend
Messages: 48
Registered: July 2009
Member
The schematron implementation is based on schematron 1.5
(http://xml.ascc.net/schematron/) which does not support variables. A
future enhancement should consider moving to the 1.6 spec which
support variables.

On Sat, 20 Jan 2007 17:07:36 +0000 (UTC), elena.tibrea@gmail.com
(elena t) wrote:

>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 Go to previous message
Eclipse UserFriend
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 #568983 is a reply to message #6910] Mon, 22 January 2007 19:22 Go to previous message
Sheldon Lee-Loy is currently offline Sheldon Lee-LoyFriend
Messages: 48
Registered: July 2009
Member
The schematron implementation is based on schematron 1.5
(http://xml.ascc.net/schematron/) which does not support variables. A
future enhancement should consider moving to the 1.6 spec which
support variables.

On Sat, 20 Jan 2007 17:07:36 +0000 (UTC), elena.tibrea@gmail.com
(elena t) wrote:

>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.
Previous Topic:Schematron validation
Next Topic:SML validation exception
Goto Forum:
  


Current Time: Tue Apr 16 19:43:48 GMT 2024

Powered by FUDForum. Page generated in 1.52221 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top