EDN Admin
Well-known member
Hi,
We are using NMatrix.Schematron to validate HL7 CCD documents. We have used .sch file as schema and xml file to validate (.sch file has templates). Schematron validates xml file all the time. But in the following situation it fails,
if .sch file has assert test as
<assert test= "document(voc.xml)/systems/system[@codeSystemName=SNOMED CT][@group=AlertStatusCode]/code[@value = current()/cda:value/@code] The value for Observation / value in an alert status observation SHALL be selected from ValueSet 2.16.840.1.113883.1.11.20.3 AlertStatusCode STATIC 20061017.</assert>
we are getting <span class=Apple-style-span style="font-family:Arial;font-size:13px;white-spacere XPathException: Unrecognized extension function namespace: prefix=, namespace URI=. <span class=Apple-style-span style="font-family:Arial;font-size:13px;white-spacere
<span class=Apple-style-span style="font-family:Arial;font-size:13px;white-spacere Stack Trace: " at GotDotNet.Exslt.ExsltContext.ResolveFunction(String prefix, String name, XPathResultType[] argTypes)rn at MS.Internal.Xml.XPath.FunctionQuery.SetXsltContext(XsltContext context)rn at MS.Internal.Xml.XPath.BaseAxisQuery.SetXsltContext(XsltContext context)rn at MS.Internal.Xml.XPath.BaseAxisQuery.SetXsltContext(XsltContext context)rn at MS.Internal.Xml.XPath.FilterQuery.SetXsltContext(XsltContext input)rn at MS.Internal.Xml.XPath.BaseAxisQuery.SetXsltContext(XsltContext context)rn at MS.Internal.Xml.XPath.FilterQuery.SetXsltContext(XsltContext input)rn at MS.Internal.Xml.XPath.CompiledXpathExpr.SetContext(XmlNamespaceManager nsManager)rn at NMatrix.Schematron.EvaluableExpression.SetContext(XmlNamespaceManager nsManager) in D:\CCD\Schematron\src\EvaluableExpression.cs:line 87rn at NMatrix.Schematron.SchemaLoader.LoadAsserts(Rule rule, XPathNavigator context) in D:\CCD\Schematron\src\SchemaLoader.cs:line 198rn at NMatrix.Schematron.SchemaLoader.LoadRules(Pattern pattern, XPathNavigator context) in D:\CCD\Schematron\src\SchemaLoader.cs:line 170rn at NMatrix.Schematron.SchemaLoader.LoadPatterns() in D:\CCD\Schematron\src\SchemaLoader.cs:line 135rn at NMatrix.Schematron.SchemaLoader.LoadSchema(XPathNavigator source) in D:\CCD\Schematron\src\SchemaLoader.cs:line 50rn at NMatrix.Schematron.Schema.Load(XPathNavigator schema) in D:\CCD\Schematron\src\Schema.cs:line 100rn at NMatrix.Schematron.Validator.AddSchema(XmlReader reader) in D:\CCD\Schematron\src\Validator.cs:line 288rn at NMatrix.Schematron.Validator.AddSchema(TextReader reader) in D:\CCD\Schematron\src\Validator.cs:line 222rn at WinTest.Home.btnExecute_Click(Object sender, EventArgs e) in D:\CCD\Schematron\samples\WinForms\Home.cs:line 418rn at System.Windows.Forms.Control.OnClick(EventArgs e)rn at System.Windows.Forms.Button.OnClick(EventArgs e)rn at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)rn at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)rn at System.Windows.Forms.Control.WndProc(Message& m)rn at System.Windows.Forms.ButtonBase.WndProc(Message& m)rn at System.Windows.Forms.Button.WndProc(Message& m)rn at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)rn at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)rn at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)rn at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)rn at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)rn at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)rn at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)rn at System.Windows.Forms.Application.Run(Form mainForm)rn at WinTest.Home.Main() in D:\CCD\Schematron\samples\WinForms\Home.cs:line 362rn at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)rn at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)rn at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()rn at System.Threading.ThreadHelper.ThreadStart_Context(Object state)rn at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)rn at System.Threading.ThreadHelper.ThreadStart()" <span class=Apple-style-span style="font-family:Arial;font-size:13px;white-spacere
<span class=Apple-style-span style="font-family:Arial;font-size:13px;white-spacere Let me know the solution to fix this issue. <span class=Apple-style-span style="font-family:Arial;font-size:13px;white-spacere
<span class=Apple-style-span style="font-family:Arial;font-size:13px;white-spacere Thanks in advance. <span class=Apple-style-span style="font-family:Arial;font-size:13px;white-spacere
View the full article
We are using NMatrix.Schematron to validate HL7 CCD documents. We have used .sch file as schema and xml file to validate (.sch file has templates). Schematron validates xml file all the time. But in the following situation it fails,
if .sch file has assert test as
<assert test= "document(voc.xml)/systems/system[@codeSystemName=SNOMED CT][@group=AlertStatusCode]/code[@value = current()/cda:value/@code] The value for Observation / value in an alert status observation SHALL be selected from ValueSet 2.16.840.1.113883.1.11.20.3 AlertStatusCode STATIC 20061017.</assert>
we are getting <span class=Apple-style-span style="font-family:Arial;font-size:13px;white-spacere XPathException: Unrecognized extension function namespace: prefix=, namespace URI=. <span class=Apple-style-span style="font-family:Arial;font-size:13px;white-spacere
<span class=Apple-style-span style="font-family:Arial;font-size:13px;white-spacere Stack Trace: " at GotDotNet.Exslt.ExsltContext.ResolveFunction(String prefix, String name, XPathResultType[] argTypes)rn at MS.Internal.Xml.XPath.FunctionQuery.SetXsltContext(XsltContext context)rn at MS.Internal.Xml.XPath.BaseAxisQuery.SetXsltContext(XsltContext context)rn at MS.Internal.Xml.XPath.BaseAxisQuery.SetXsltContext(XsltContext context)rn at MS.Internal.Xml.XPath.FilterQuery.SetXsltContext(XsltContext input)rn at MS.Internal.Xml.XPath.BaseAxisQuery.SetXsltContext(XsltContext context)rn at MS.Internal.Xml.XPath.FilterQuery.SetXsltContext(XsltContext input)rn at MS.Internal.Xml.XPath.CompiledXpathExpr.SetContext(XmlNamespaceManager nsManager)rn at NMatrix.Schematron.EvaluableExpression.SetContext(XmlNamespaceManager nsManager) in D:\CCD\Schematron\src\EvaluableExpression.cs:line 87rn at NMatrix.Schematron.SchemaLoader.LoadAsserts(Rule rule, XPathNavigator context) in D:\CCD\Schematron\src\SchemaLoader.cs:line 198rn at NMatrix.Schematron.SchemaLoader.LoadRules(Pattern pattern, XPathNavigator context) in D:\CCD\Schematron\src\SchemaLoader.cs:line 170rn at NMatrix.Schematron.SchemaLoader.LoadPatterns() in D:\CCD\Schematron\src\SchemaLoader.cs:line 135rn at NMatrix.Schematron.SchemaLoader.LoadSchema(XPathNavigator source) in D:\CCD\Schematron\src\SchemaLoader.cs:line 50rn at NMatrix.Schematron.Schema.Load(XPathNavigator schema) in D:\CCD\Schematron\src\Schema.cs:line 100rn at NMatrix.Schematron.Validator.AddSchema(XmlReader reader) in D:\CCD\Schematron\src\Validator.cs:line 288rn at NMatrix.Schematron.Validator.AddSchema(TextReader reader) in D:\CCD\Schematron\src\Validator.cs:line 222rn at WinTest.Home.btnExecute_Click(Object sender, EventArgs e) in D:\CCD\Schematron\samples\WinForms\Home.cs:line 418rn at System.Windows.Forms.Control.OnClick(EventArgs e)rn at System.Windows.Forms.Button.OnClick(EventArgs e)rn at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)rn at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)rn at System.Windows.Forms.Control.WndProc(Message& m)rn at System.Windows.Forms.ButtonBase.WndProc(Message& m)rn at System.Windows.Forms.Button.WndProc(Message& m)rn at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)rn at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)rn at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)rn at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)rn at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)rn at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)rn at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)rn at System.Windows.Forms.Application.Run(Form mainForm)rn at WinTest.Home.Main() in D:\CCD\Schematron\samples\WinForms\Home.cs:line 362rn at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)rn at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)rn at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()rn at System.Threading.ThreadHelper.ThreadStart_Context(Object state)rn at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)rn at System.Threading.ThreadHelper.ThreadStart()" <span class=Apple-style-span style="font-family:Arial;font-size:13px;white-spacere
<span class=Apple-style-span style="font-family:Arial;font-size:13px;white-spacere Let me know the solution to fix this issue. <span class=Apple-style-span style="font-family:Arial;font-size:13px;white-spacere
<span class=Apple-style-span style="font-family:Arial;font-size:13px;white-spacere Thanks in advance. <span class=Apple-style-span style="font-family:Arial;font-size:13px;white-spacere
View the full article