-
-
Notifications
You must be signed in to change notification settings - Fork 15
Open
Description
I've got a schematron (v1.31).
It contains xslt-style defined functions.
One example:
<ns prefix="u" uri="utils" />
<function xmlns="http://www.w3.org/1999/XSL/Transform" name="u:slack" as="xs:boolean">
<param name="exp" as="xs:decimal" />
<param name="val" as="xs:decimal" />
<param name="slack" as="xs:decimal" />
<value-of select="xs:decimal($exp + $slack) >= $val and xs:decimal($exp - $slack) <= $val" />
</function>
when running code which uses the XPath2 lib I get: 'The function '' was not found in namespace ''.
How
I call the code with:
XPath2Expression.Compile(assert.Test, nsManager);
nsManager is a new XmlNamespaceManager(nameTable); where nameTable contains u:
Call Stack:
XPath2.dll!Wmhelp.XPath2.AST.FuncNode.FuncNode(Wmhelp.XPath2.XPath2Context context, string name, string ns, System.Collections.Generic.List<object> nodes) Line 41 C#
XPath2.dll!Wmhelp.XPath2.YYParser.yyparse(Wmhelp.XPath2.yyParser.yyInput yyLex) Line 657 C#
XPath2.dll!Wmhelp.XPath2.YYParser.yyparse(Wmhelp.XPath2.yyParser.yyInput yyLex, object yyd) Line 159 C#
XPath2.dll!Wmhelp.XPath2.YYParser.yyparseSafe(Wmhelp.XPath2.Tokenizer tok, object yyDebug) Line 60 C#
XPath2.dll!Wmhelp.XPath2.YYParser.yyparseSafe(Wmhelp.XPath2.Tokenizer tok) Line 53 C#
XPath2.dll!Wmhelp.XPath2.XPath2Expression.Compile(string xpath, System.Xml.IXmlNamespaceResolver resolver) Line 171 C#
the FunctionTable.Inst contains 138 items but function 'slack' seems to be missing.
Is there a way to add these xslt-style functions?
Metadata
Metadata
Assignees
Labels
No labels