
Hi, I have the Schematron schema at the end of this email, which I think is correct. If I compile it myself using the SVRL and ISO skeleton for Saxon from http://www.schematron.com/, everything's fine and it seems to validate correctly my instances. But if I assiciate it directly to one instance (Associate Schema... action) it seems there is a problem at compile time: see the screenshot (sorry I didn't find where to look for the complete text error messages) at: http://www.fgeorges.org/tmp/oxygen-schematron-error.jpg So my questions are: 1/ where (how) is it possible to find the complete error messages, as text? and 2/ do you have any clue about that error? Regards, -- Florent Georges http://www.fgeorges.org/ <schema xmlns="http://purl.oclc.org/dsdl/schematron" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" queryBinding="xslt2"> <ns prefix="my" uri="dummy-ns-uri"/> <let name="dico" value="doc('luis-costa-rules.xml')/rules/ContentInfo"/> <xsl:function name="my:attr-eq"> <xsl:param name="lhs" as="attribute()"/> <xsl:param name="rhs" as="attribute()"/> <xsl:sequence select=" node-name($lhs) eq node-name($rhs) and $lhs eq $rhs"/> </xsl:function> <xsl:function name="my:info-eq"> <xsl:param name="lhs" as="element(ContentInfo)"/> <xsl:param name="rhs" as="element(ContentInfo)"/> <xsl:sequence select=" count($lhs/@*) eq count($rhs/@*) and ( every $a in $lhs/@* satisfies $rhs/@*[my:attr-eq(., $a)] )"/> </xsl:function> <pattern> <rule context="ContentInfo"> <assert test="some $d in $dico satisfies my:info-eq(., $d)"> Message... </assert> </rule> </pattern> </schema>

Florent Georges wrote:
I have the Schematron schema at the end of this email
BTW, everything works just fine with this simplified version: <schema xmlns="http://purl.oclc.org/dsdl/schematron" queryBinding="xslt2"> <let name="dico" value=" doc('luis-costa-rules.xml')/rules/ContentInfo"/> <pattern> <rule context="ContentInfo"> <assert test=" some $d in $dico satisfies deep-equal(., $d)"> Message... </assert> </rule> </pattern> </schema> Regards, -- Florent Georges http://www.fgeorges.org/

Hi Florent, Trying your sample I get the errors below [1]. The problem is related with the use of xsl:function. You need to enable the allow foreign elements option in Options->Preferences -- XML -- XML Parser -- ISO Schematron. Let me know if you still have any issues. [1] list of errors: SystemID: D:\users\george\test\test.sch Description: [ISO Schematron (XSLT 2.0)] Warning: unrecognized element xsl:function from namespace http://www.w3.org/1999/XSL/Transform SystemID: D:\users\george\test\test.sch Description: [ISO Schematron (XSLT 2.0)] Warning: unrecognized element xsl:function from namespace http://www.w3.org/1999/XSL/Transform SystemID: D:\users\george\test\test.sch Description: [ISO Schematron (XSLT 2.0)] Failed to compile stylesheet. 1 error detected. SystemID: D:\users\george\test\test.sch Description: [ISO Schematron (XSLT 2.0)] XPath syntax error at char 44 on line 151 in {...co satisfies my:info-eq(., ...}: Cannot find a matching 2-argument function named {dummy-ns-uri}info-eq() URL: http://www.w3.org/TR/xpath20/#ERRXPST0017 SystemID: D:\users\george\test\test.xml Description: [ISO Schematron (XSLT 2.0)] Got a fatal error trying to create a transformer from the stylesheet! SystemID: D:\users\george\test\test.sch Description: [ISO Schematron (XSLT 2.0)] Failed to compile stylesheet. 1 error detected. SystemID: D:\users\george\test\test.sch Description: [ISO Schematron (XSLT 2.0)] XPath syntax error at char 44 on line 151 in {...co satisfies my:info-eq(., ...}: Cannot find a matching 2-argument function named {dummy-ns-uri}info-eq() URL: http://www.w3.org/TR/xpath20/#ERRXPST0017 Best Regards, George -- George Cristian Bina <oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger http://www.oxygenxml.com Florent Georges wrote:
Hi,
I have the Schematron schema at the end of this email, which I think is correct. If I compile it myself using the SVRL and ISO skeleton for Saxon from http://www.schematron.com/, everything's fine and it seems to validate correctly my instances.
But if I assiciate it directly to one instance (Associate Schema... action) it seems there is a problem at compile time: see the screenshot (sorry I didn't find where to look for the complete text error messages) at:
http://www.fgeorges.org/tmp/oxygen-schematron-error.jpg
So my questions are: 1/ where (how) is it possible to find the complete error messages, as text? and 2/ do you have any clue about that error?
Regards,

George Cristian Bina wrote:
The problem is related with the use of xsl:function. You need to enable the allow foreign elements option
Oh, I had missed this one. Thanks, George.
[1] list of errors:
BTW, where did you find the complete error messages? Regards, -- Florent Georges http://www.fgeorges.org/

I put your schema in test.sch and then I had a test.xml file like below: <?xml version="1.0" encoding="UTF-8"?> <?oxygen SCHSchema="test.sch"?> <test/> A validate action on test.xml gives me all those error messages. I selected them all, CTRL+C then CTRL+V in the mail client. Best Regards, George -- George Cristian Bina <oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger http://www.oxygenxml.com Florent Georges wrote:
George Cristian Bina wrote:
The problem is related with the use of xsl:function. You need to enable the allow foreign elements option
Oh, I had missed this one. Thanks, George.
[1] list of errors:
BTW, where did you find the complete error messages?
Regards,

George Cristian Bina wrote:
A validate action on test.xml gives me all those error messages. I selected them all, CTRL+C then CTRL+V in the mail client.
Oops, I didn't think about the explicit Validate action. Thanks for the help about this simple one :-) Regards, -- Florent Georges http://www.fgeorges.org/
participants (2)
-
Florent Georges
-
George Cristian Bina