The best place to raise Saxon queries like this is on the forums or bug 
trackers at http://saxonica.plan.io. The xquery-talk list is for questions 
about the XQuery language, not product-specific implementation issues.

We are investigating whether current releases of Saxon should still work on 
.NET version 2.0, and will get back to you off-list. The answer may well be 
that you need to upgrade to .NET 3.5.

Michael Kay
Saxonica

On 7 Aug 2013, at 03:13, 廖勇 wrote:

> Hi sir,
> First of all, thank you for your great work.
> Here I have a problem when I use Saxon9HE(version 9.5.0.2) for .net as 
> follows.
>  
> First , the situation:
> 1.      I only installed .net framework 2.0 sp2 in my computer.
> 2.      My OS version is Windows XP Sp3
> 3.      The xuqery content is
>     let $now := string(current-dateTime())
> return 
> concat(substring($now,1,4),substring($now,6,2),substring($now,9,2),substring($now,12,2),substring($now,15,2),substring($now,18,2))
> 4.      The way I call saxon xquery processor is like this. By the way, our 
> projects are developed with VS2005.
>  
> private string QueryCore(string queryText, Dictionary<string, string> 
> paramVals, string baseUri)
>         {
>             if (string.IsNullOrEmpty(queryText))
>                 return string.Empty;
>             if (this.m_compiler == null)
>                 throw new Exception("XQuery处理器尚未初始化");
>  
>             //here we make up a xquery string
>             string xquery = GenerateXQuery(queryText, paramVals);
>  
>             Uri uri = new Uri(baseUri);
>             this.m_compiler.BaseUri = uri.AbsoluteUri;
>             XQueryExecutable exp = this.m_compiler.Compile(xquery); 
> //可执行xquery装载器
>             XQueryEvaluator eval = exp.Load(); //xquery执行器
>  
>             //here we set value to the variables
>             if (paramVals != null && paramVals.Count > 0)
>             {
>                 this.m_docBuilder.BaseUri = uri;
>                 foreach (KeyValuePair<string, string> var in paramVals)
>                 {
>                     if (string.IsNullOrEmpty(var.Value))
>                     {
>                         eval.SetExternalVariable(new QName(var.Key), 
> XdmEmptySequence.INSTANCE);
>                     }
>                     else
>                     {
>                         eval.SetExternalVariable(new QName(var.Key),
>                             this.m_docBuilder.Build(new 
> StringReader(var.Value)));
>                     }
>                 }
>             }
>             //here we get the result and return as a string, and here an 
> error occurred as the screen capture shows.
>             return ConvertToString(eval.Evaluate());
>         }
> 5. <image001.png>  The message is to say that system.core assembly cannot be 
> loaded .
>  
> Second, The question:
> 1.     Could you please help check why the error occurred ?
> 2.     How to figure this out ?
>  
> Note: I’ve checked our projects, there are no linq, no extension methods,etc. 
> related with system.core used in our projects. And we don’t want to deploy 
> .net framework 3.5 if possible.
>  
> Thank you very much, long for your reply.
>  

_______________________________________________
[email protected]
http://x-query.com/mailman/listinfo/talk

Reply via email to