gap777 / SchemaTron

Native C#/.NET implementation of ISO schematron
Other
19 stars 7 forks source link

The prefix 'xxxx' cannot be expanded into a namespace URI by using the statically known namespaces #1

Closed zeynepcelik closed 10 years ago

zeynepcelik commented 10 years ago

I download XPath2Support's sources and validate my xml. But in my schematron, there is one line that cause error:

gl-cor:enteredDate elemanın değeri ile değerleri arasında olmalıdır.

When i delete and elements, error is no more exists.

What should i do for dispose the error?

gap777 commented 10 years ago

Can you provide a small test case-- the smallest bit of schematron logic and XML to be validated which exhibit the problem? I'll try to look into it.

zeynepcelik commented 10 years ago

How can i write code ? Some part of xml is broken when i write here.

gap777 commented 10 years ago

Zip the files and upload them to a file sharing site, then send me a link.

zeynepcelik commented 10 years ago

https://www.dropbox.com/s/ws7j080nrtfdggt/SchAndXmlFile.zip

zeynepcelik commented 10 years ago

if you find "value-of select" string(ctrl+F) in schematron file, you can find out cause of error. When I replace "value-of select" with plain text, error is no more exists.

gap777 commented 10 years ago

I've inspected your samples.

Did you write the schematron yourself?

It appears to be testing that a date is between a valid range. The "<value-of select..." shouldn't cause you problems; that's just the error message if the assert test fails:

"not(gl-cor:enteredDate) or (gl-cor:enteredDate >= $periodCoveredStart and gl-cor:enteredDate <= $periodCoveredEnd)"

In your sample, enteredDate is "2014-04-01", periodCoveredStart is "2014-04-01" and periodCoveredEnd is "2014-04-30".

If the system were aware that these were dates, I agree the test should pass. Maybe it's not considering them to be dates...

Either way, removing the value-of in the error message shouldn't change anything about the test being performed.

zeynepcelik commented 10 years ago

No I didn't write the schematron myself.

It was aware that these were dates. Because it pass another rule which is about the dates. When i change the dates , it can't pass the test. So rule is true.

The thing is not the schema error. Thing is it threw exception from Validator.cs class' CompileXPathExpressions function which i screenshot that lines. The pic is here:https://www.dropbox.com/s/7c1sselgzpspyil/Untitled.rar

gap777 commented 10 years ago

Thanks, I understand better.... what exception did it throw?

On Fri, Jun 13, 2014 at 8:29 AM, zeynepcelik notifications@github.com wrote:

No I didn't write the schematron myself.

It was aware that these were dates. Because it pass another rule which is about the dates. When i change the dates , it can't pass the test. So rule is true.

The thing is not the schema error. Thing is it threw exception from Validator.cs class' CompileXPathExpressions function which i screenshot that lines. The pic is here: https://www.dropbox.com/s/7c1sselgzpspyil/Untitled.rar

— Reply to this email directly or view it on GitHub https://github.com/gap777/SchemaTron/issues/1#issuecomment-46005164.

zeynepcelik commented 10 years ago

Exception is: The prefix 'edefter' cannot be expanded into a namespace URI by using the statically known namespaces

gap777 commented 10 years ago

I suggest you try the same thing using the XmlPrime branch. I suspect an error from compiling the Xpath expression, which is just a pass through functionality of the underlying XPath2 impl.

zeynepcelik commented 10 years ago

Hi, I have another problem with different schematron file. Here is sch file: https://www.dropbox.com/s/dfeqhfyo0olo0y1/edefter_kebir.zip

Error is "the function 'isSorted'/1 was not found in namespace 'localfunctions'"

What would be the cause of error?

fatihkaymak commented 10 years ago

Hello,

I'm having the same error: "the function 'isSorted'/1 was not found in namespace 'localfunctions'"

Have you solved the issue? I you have; please inform me too.

gap777 commented 10 years ago

Have you tried using the XmlPrime branch? That's the only one I'm really using/maintaining.

fatihkaymak commented 10 years ago

XmlPrime is an expensive library. And there is no trial. May be i have a chance to try it and if i saw that it worked successfully; i would purchase it. But first pay and then try; that is not proper. Do you offer another library for Xslt 2.0 to use with XRouter - Schematron?

Now for Xpath 2.0 i use WmHelp - XPath20Api.dll. This library support for XSLT 1.0; not 2.0. So this cause that problem; isSorted function was not found.

gap777 commented 10 years ago
  1. XmlPrime does offer a trial. I encourage you to get it.
  2. XmlPrime is free for non-commercial use. If you are a non-commercial entity (eg. an individual) and you are not charging for your product, and the product has no other commercial purpose, then you can use the trial version of XmlPrime for free for as long as you like.
  3. If you find another xpath2/xslt2 .NET library, you can fork the master and integrate it.
  4. Correct -- XPath2 does not support xslt2, but your query bindings indicated that you needed xpath2 not xslt2. If you need xslt2 in your schematron file, the query bindings should be "xslt2".

On Mon, Jul 21, 2014 at 4:23 PM, fatihkaymak notifications@github.com wrote:

XmlPrime is an expensive library. And there is no trial. May be i have a chance to try it and if i saw that it worked successfully; i would purchase it. But first pay and then try; that is not proper. Do you offer another library for Xslt 2.0 to use with XRouter - Schematron?

Now for Xpath 2.0 i use WmHelp - XPath20Api.dll. This library support for XSLT 1.0; not 2.0. So this cause that problem; isSorted function was not found.

— Reply to this email directly or view it on GitHub https://github.com/gap777/SchemaTron/issues/1#issuecomment-49660157.

fatihkaymak commented 10 years ago

Actually i wanted to mean that XmlPrime trial has expired. Today i sent a mail to info mail and they sent to me updated trial dll. Now i can try it. I want to work with SchemaTron (XRouter) project with XmlPrime. If it has been already ready; could you think to share the code? If not; i will begin coding to integrate XmlPrime to SchemaTron code that i have.

gap777 commented 10 years ago

The code is already shared on a branch of that project.

On Tue, Jul 22, 2014 at 10:03 AM, fatihkaymak notifications@github.com wrote:

Actually i wanted to mean that XmlPrime trial has expired. Today i sent a mail to info mail and they sent to me updated trial dll. Now i can try it. I want to work with SchemaTron (XRouter) project with XmlPrime. If it has been already ready; could you think share the code? I not; i will integrate XmlPrime to SchemaTron code that i have.

— Reply to this email directly or view it on GitHub https://github.com/gap777/SchemaTron/issues/1#issuecomment-49742672.

zeynepcelik commented 10 years ago

You can look at this link : http://stackoverflow.com/questions/24309518/schematron-localfunctions-gives-error