RE: Cannot import library module using URL

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

RE: Cannot import library module using URL

Premal Desai
Dear Mr. Kay,
 
I just reconfirmed that the library module contents are the same in all the cases. The error messages in all the listed scenarios are not different.
 
The library module contains a very simple function with no parameters and one line of erroneous code (written deliberately) so that when accessed, my JUnit test can display the error message and confirm that it is able to access the function and in turn, reference the library module successfully.
 
Library Module Contents:
module namespace md1 = "xxx"; declare function md1:f(){ $doc}; 
 
Main Module contents are in my very first mail that reports the problem(below).


 


From: Michael Kay [mailto:[hidden email]]
Sent: Wednesday, October 05, 2005 5:51 PM
To: Premal Desai
Subject: RE: Cannot import library module using URL

Firstly, could you please note that the correct way to post problems on Saxon-B is the saxon-help list or forum at sourceforge. This enables other users to contribute to the solution and to have access to the responses, and it also helps me track the history.
 
The error message you are getting suggests strongly that the module has been successfully fetched via the URI given, but that its syntax is incorrect for a library module. A library module must start with the declaration "module namespace ...", and Saxon is saying that it did not find this syntax but instead found <element>. What is actually in the module?
 
I know this explanation doesn't match your claim that it worked when the module was accessed using a different URI, but the syntax error message is very explicit. If it had failed to fetch the module you would get a quite different message, as you could verify by putting in a bad URI. Perhaps it wasn't actually the same module?
 
Michael Kay


 


From: Premal Desai [mailto:[hidden email]]
Sent: 05 October 2005 22:12
To: [hidden email]
Subject: [Norton AntiSpam] Cannot import library module using URL

Hello,
 
I have hit the wall with this problem -
I have a main module that is unable to import  a library module because of the URL I am supplying  in the module import statement. As a result, I cannot execute my function that's referenced. My import module statement is as:
 
m1:f()
 
This URL, when referenced in the browser,  returns the library module as text (as expected). However, when I run my JUnit test to compile the above XQuery, I get the following error from SAXON8.5;

Error on line 4 column 1 of http://localhost:8081/weblayers-center/web/xquery_service_ui.wl?operation=GetXQueryModule&id=4028489406c250610106c252d9a60002:

XPST0003: XQuery syntax error in #
<#:
expected "module namespace", found "<element>"

Can you please suggest/advise on what I can try to get my main module to import the library module using the above url? It is important that we access it this way. Please note that I have tried out the following:
 
1. Instead of having the library module returned from the web service (in the above url), I simply stored it in a text file and accessed it as via URL. That was imported successfully in the main module
 
import module namespace m1 = "xxx" at http://localhost:8081/weblayers-center/xquery-lib/test.xq";
m1:f()
Status: This Works
 
2. Instead of having the library module returned from the web service (in the above url), I simply stored it in a text file and accessed it as via file URL. That was imported successfully in the main module
 
import module namespace m1 = "xxx" at "file:///C:/weblayers-center/xquery-lib/test.xq";
m1:f()
Status: This Works
 
 
3. I also tried escaping my URL. But that does not work either. Modified my url to:
Status: That does not work. Got the same error message from Saxon as shown above.
 
Also note that I am using open source Saxon 851.
 
Any help will be appreciated.
Thank You.
premal
 
 


Yahoo! for Good
Click here to donate to the Hurricane Katrina relief effort.
Reply | Threaded
Open this post in threaded view
|

RE: RE: Cannot import library module using URL

Michael Kay
I can't specifically relate this to the symptoms you are seeing but one possible cause of trouble is the ampersand in the URI. An ampersand in a URILiteral is not legal unless it is escaped as &amp; - however, I'm not sure that Saxon is enforcing this correctly.
 
Is there any chance you can put this up on a public web server so I can investigate it? If I can't reproduce the problem, I'm unlikely to be able to solve it.
 
I'm confused by your statement that the library module contains a line of erroneous code. If that's the case, wouldn't you expect a Saxon error message?
 
Michael Kay
Saxonica


From: [hidden email] [mailto:[hidden email]] On Behalf Of Premal Desai
Sent: 06 October 2005 15:22
To: [hidden email]
Subject: [saxon] RE: Cannot import library module using URL

Dear Mr. Kay,
 
I just reconfirmed that the library module contents are the same in all the cases. The error messages in all the listed scenarios are not different.
 
The library module contains a very simple function with no parameters and one line of erroneous code (written deliberately) so that when accessed, my JUnit test can display the error message and confirm that it is able to access the function and in turn, reference the library module successfully.
 
Library Module Contents:
module namespace md1 = "xxx"; declare function md1:f(){ $doc}; 
 
Main Module contents are in my very first mail that reports the problem(below).


 


From: Michael Kay [mailto:[hidden email]]
Sent: Wednesday, October 05, 2005 5:51 PM
To: Premal Desai
Subject: RE: Cannot import library module using URL

Firstly, could you please note that the correct way to post problems on Saxon-B is the saxon-help list or forum at sourceforge. This enables other users to contribute to the solution and to have access to the responses, and it also helps me track the history.
 
The error message you are getting suggests strongly that the module has been successfully fetched via the URI given, but that its syntax is incorrect for a library module. A library module must start with the declaration "module namespace ...", and Saxon is saying that it did not find this syntax but instead found <element>. What is actually in the module?
 
I know this explanation doesn't match your claim that it worked when the module was accessed using a different URI, but the syntax error message is very explicit. If it had failed to fetch the module you would get a quite different message, as you could verify by putting in a bad URI. Perhaps it wasn't actually the same module?
 
Michael Kay


 


From: Premal Desai [mailto:[hidden email]]
Sent: 05 October 2005 22:12
To: [hidden email]
Subject: [Norton AntiSpam] Cannot import library module using URL

Hello,
 
I have hit the wall with this problem -
I have a main module that is unable to import  a library module because of the URL I am supplying  in the module import statement. As a result, I cannot execute my function that's referenced. My import module statement is as:
 
m1:f()
 
This URL, when referenced in the browser,  returns the library module as text (as expected). However, when I run my JUnit test to compile the above XQuery, I get the following error from SAXON8.5;

Error on line 4 column 1 of http://localhost:8081/weblayers-center/web/xquery_service_ui.wl?operation=GetXQueryModule&id=4028489406c250610106c252d9a60002:

XPST0003: XQuery syntax error in #
<#:
expected "module namespace", found "<element>"

Can you please suggest/advise on what I can try to get my main module to import the library module using the above url? It is important that we access it this way. Please note that I have tried out the following:
 
1. Instead of having the library module returned from the web service (in the above url), I simply stored it in a text file and accessed it as via URL. That was imported successfully in the main module
 
import module namespace m1 = "xxx" at http://localhost:8081/weblayers-center/xquery-lib/test.xq";
m1:f()
Status: This Works
 
2. Instead of having the library module returned from the web service (in the above url), I simply stored it in a text file and accessed it as via file URL. That was imported successfully in the main module
 
import module namespace m1 = "xxx" at "file:///C:/weblayers-center/xquery-lib/test.xq";
m1:f()
Status: This Works
 
 
3. I also tried escaping my URL. But that does not work either. Modified my url to:
Status: That does not work. Got the same error message from Saxon as shown above.
 
Also note that I am using open source Saxon 851.
 
Any help will be appreciated.
Thank You.
premal
 
 


Yahoo! for Good
Click here to donate to the Hurricane Katrina relief effort.
Reply | Threaded
Open this post in threaded view
|

RE: Cannot import library module using URL

Premal Desai
In reply to this post by Premal Desai
I just found out that the problem is on my end in this issue. The inport of module fails because that particular URL pattern (.wl)has  a security contraint on our application server requring the user to be authenticated. Hence,  the failure. All other module imports  are able to go through because those URLs do not contain patterns with any contstraints.
 
Thank you.
premal
 
 
 Dear Mr. Kay,
 
I just reconfirmed that the library module contents are the same in all the cases. The
error messages in all the listed scenarios are not different.
 
The library module contains a very simple function with no parameters and one line of
erroneous code (written deliberately) so that when accessed, my JUnit test can display the
error message and confirm that it is able to access the function and in turn, reference the
library module successfully.
 
Library Module Contents:
module namespace md1 = "xxx"; declare function md1:f(){ $doc};
 
Main Module contents are in my very first mail that reports the problem(below).


 

---------------------------------
From: Michael Kay [mailto:support@sa...]
Sent: Wednesday, October 05, 2005 5:51 PM
To: Premal Desai
Subject: RE: Cannot import library module using URL



Firstly, could you please note that the correct way to post problems on Saxon-B is the
saxon-help list or forum at sourceforge. This enables other users to contribute to the
solution and to have access to the responses, and it also helps me track the history.
 
The error message you are getting suggests strongly that the module has been successfully
fetched via the URI given, but that its syntax is incorrect for a library module. A library
module must start with the declaration "module namespace ...", and Saxon is saying that it
did not find this syntax but instead found <element>. What is actually in the module?
 
I know this explanation doesn't match your claim that it worked when the module was
accessed using a different URI, but the syntax error message is very explicit. If it had
failed to fetch the module you would get a quite different message, as you could verify by
putting in a bad URI. Perhaps it wasn't actually the same module?
 
Michael Kay
http://www.saxonica.com/


 

---------------------------------
From: Premal Desai [mailto:premal.desai@we...]
Sent: 05 October 2005 22:12
To: support@sa...
Subject: [Norton AntiSpam] Cannot import library module using URL



Hello,
 
I have hit the wall with this problem -
I have a main module that is unable to import  a library module because of the URL I am
supplying  in the module import statement. As a result, I cannot execute my function that's
referenced. My import module statement is as:
 
import module namespace m1 = "xxx" at
"http://localhost:8081/weblayers-center/web/xquery_service_ui.wl?operation=GetXQueryModule&id=4028489406c250610106c252d9a60002";
m1:f()
 
This URL, when referenced in the browser,  returns the library module as text (as
expected). However, when I run my JUnit test to compile the above XQuery, I get the
following error from SAXON8.5;

Error on line 4 column 1 of
http://localhost:8081/weblayers-center/web/xquery_service_ui.wl?operation=GetXQueryModule&id=4028489406c250610106c252d9a60002:

XPST0003: XQuery syntax error in #
<#:
expected "module namespace", found "<element>"

Can you please suggest/advise on what I can try to get my main module to import the library
module using the above url? It is important that we access it this way. Please note that I
have tried out the following:
 
1. Instead of having the library module returned from the web service (in the above url), I
simply stored it in a text file and accessed it as via URL. That was imported successfully
in the main module
 
import module namespace m1 = "xxx" at
http://localhost:8081/weblayers-center/xquery-lib/test.xq";
m1:f()
Status: This Works
 
2. Instead of having the library module returned from the web service (in the above url), I
simply stored it in a text file and accessed it as via file URL. That was imported
successfully in the main module 
import module namespace m1 = "xxx" at "file:///C:/weblayers-center/xquery-lib/test.xq";
m1:f()
Status: This Works


 
 
3. I also tried escaping my URL. But that does not work either. Modified my url to:
 
import module namespace m1 = "xxx" at
"http://localhost:8081/weblayers-center/web/xquery_service_ui.wl?operation=GetXQueryModule&amp;id=4028489406c250610106c252d9a60002";
m1:f()

Status: That does not work. Got the same error message from Saxon as shown above.
 
Also note that I am using open source Saxon 851.
 
Any help will be appreciated.
Thank You.
premal

 
 


---------------------------------
Yahoo! for Good
  Click here to donate to the Hurricane Katrina relief effort.

    From: Michael Kay <mike@sa...>
    RE: RE: Cannot import library module using URL  
    2005-10-06 08:18
     
     
     
     I can't specifically relate this to the symptoms you are seeing but one
     possible cause of trouble is the ampersand in the URI. An ampersand in a
     URILiteral is not legal unless it is escaped as &amp; - however, I'm not
     sure that Saxon is enforcing this correctly.
      
     Is there any chance you can put this up on a public web server so I can
     investigate it? If I can't reproduce the problem, I'm unlikely to be able to
     solve it.
      
     I'm confused by your statement that the library module contains a line of
     erroneous code. If that's the case, wouldn't you expect a Saxon error
     message?
      
     Michael Kay
     Saxonica
     
     
       _____  
     
     From: saxon-help-admin@li...
     [mailto:saxon-help-admin@li...] On Behalf Of Premal Desai
     Sent: 06 October 2005 15:22
     To: saxon-help@li...
     Subject: [saxon] RE: Cannot import library module using URL
     
     
     Dear Mr. Kay,
      
     I just reconfirmed that the library module contents are the same in all the
     cases. The error messages in all the listed scenarios are not different.
      
     The library module contains a very simple function with no parameters and
     one line of erroneous code (written deliberately) so that when accessed, my
     JUnit test can display the error message and confirm that it is able to
     access the function and in turn, reference the library module successfully.
      
     Library Module Contents:
     module namespace md1 = "xxx"; declare function md1:f(){ $doc}; 
      
     Main Module contents are in my very first mail that reports the
     problem(below).
     
     
      
     
       _____  
     
     From: Michael Kay [mailto:support@sa...] 
     Sent: Wednesday, October 05, 2005 5:51 PM
     To: Premal Desai
     Subject: RE: Cannot import library module using URL
     
     
     Firstly, could you please note that the correct way to post problems on
     Saxon-B is the saxon-help list or forum at sourceforge. This enables other
     users to contribute to the solution and to have access to the responses, and
     it also helps me track the history.
      
     The error message you are getting suggests strongly that the module has been
     successfully fetched via the URI given, but that its syntax is incorrect for
     a library module. A library module must start with the declaration "module
     namespace ...", and Saxon is saying that it did not find this syntax but
     instead found <element>. What is actually in the module?
      
     I know this explanation doesn't match your claim that it worked when the
     module was accessed using a different URI, but the syntax error message is
     very explicit. If it had failed to fetch the module you would get a quite
     different message, as you could verify by putting in a bad URI. Perhaps it
     wasn't actually the same module?
      
     Michael Kay
     http://www.saxonica.com/
     
     
      
     
       _____  
     
     From: Premal Desai [mailto:premal.desai@we...] 
     Sent: 05 October 2005 22:12
     To: support@sa...
     Subject: [Norton AntiSpam] Cannot import library module using URL
     
     
     Hello,
      
     I have hit the wall with this problem - 
     I have a main module that is unable to import  a library module because of
     the URL I am supplying  in the module import statement. As a result, I
     cannot execute my function that's referenced. My import module statement is
     as:
      
     import module namespace m1 = "xxx" at
     "http://localhost:8081/weblayers-center/web/xquery_service_ui.wl?operation=G
     etXQueryModule
     <http://localhost:8081/weblayers-center/web/xquery_service_ui.wl?operation=G
     etXQueryModule&id=4028489406c250610106c252d9a60002>
     &id=4028489406c250610106c252d9a60002";
     m1:f()
      
     This URL, when referenced in the browser,  returns the library module as
     text (as expected). However, when I run my JUnit test to compile the above
     XQuery, I get the following error from SAXON8.5;
     Error on line 4 column 1 of
     http://localhost:8081/weblayers-center/web/xquery_service_ui.wl?operation=Ge
     tXQueryModule
     <http://localhost:8081/weblayers-center/web/xquery_service_ui.wl?operation=G
     etXQueryModule&id=4028489406c250610106c252d9a60002>
     &id=4028489406c250610106c252d9a60002:
     
     XPST0003: XQuery syntax error in #
     <#:
     expected "module namespace", found "<element>"
     
     Can you please suggest/advise on what I can try to get my main module to
     import the library module using the above url? It is important that we
     access it this way. Please note that I have tried out the following:
      
     1. Instead of having the library module returned from the web service (in
     the above url), I simply stored it in a text file and accessed it as via
     URL. That was imported successfully in the main module
      
     import module namespace m1 = "xxx" at
     http://localhost:8081/weblayers-center/xquery-lib/test.xq";
     m1:f()
     Status: This Works
      
     2. Instead of having the library module returned from the web service (in
     the above url), I simply stored it in a text file and accessed it as via
     file URL. That was imported successfully in the main module 
      
     import module namespace m1 = "xxx" at
     "file:///C:/weblayers-center/xquery-lib/test.xq";
     m1:f()
     Status: This Works
      
      
     3. I also tried escaping my URL. But that does not work either. Modified my
     url to:
     
      
     import module namespace m1 = "xxx" at
     "http://localhost:8081/weblayers-center/web/xquery_service_ui.wl?operation=G
     etXQueryModule
     <http://localhost:8081/weblayers-center/web/xquery_service_ui.wl?operation=G
     etXQueryModule&amp;id=4028489406c250610106c252d9a60002>
     &amp;id=4028489406c250610106c252d9a60002";
     m1:f()
     Status: That does not work. Got the same error message from Saxon as shown
     above.
      
     Also note that I am using open source Saxon 851.
      
     Any help will be appreciated.
     Thank You.
     premal
      
      
     
     
     
       _____  
     
     Yahoo! for Good
     Click  <<A href="http://store.yahoo.com/redcross-donate3/>" target=_NEW>http://store.yahoo.com/redcross-donate3/> here to donate to the
     Hurricane Katrina relief effort. 
    

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

Reply | Threaded
Open this post in threaded view
|

RE: RE: Cannot import library module using URL

Michael Kay
Thanks for letting us know the outcome.
 
Your bug report did have one useful if accidental consequence: I realized that Saxon isn't handling ampersands in XQuery URI literals correctly, and this has now been fixed.
 
Michael Kay


From: [hidden email] [mailto:[hidden email]] On Behalf Of Premal Desai
Sent: 09 October 2005 22:09
To: [hidden email]
Subject: [Norton AntiSpam] [saxon] RE: Cannot import library module using URL

I just found out that the problem is on my end in this issue. The inport of module fails because that particular URL pattern (.wl)has  a security contraint on our application server requring the user to be authenticated. Hence,  the failure. All other module imports  are able to go through because those URLs do not contain patterns with any contstraints.
 
Thank you.
premal
 
 
 Dear Mr. Kay,
 
I just reconfirmed that the library module contents are the same in all the cases. The
error messages in all the listed scenarios are not different.
 
The library module contains a very simple function with no parameters and one line of
erroneous code (written deliberately) so that when accessed, my JUnit test can display the
error message and confirm that it is able to access the function and in turn, reference the
library module successfully.
 
Library Module Contents:
module namespace md1 = "xxx"; declare function md1:f(){ $doc};
 
Main Module contents are in my very first mail that reports the problem(below).


 

---------------------------------
From: Michael Kay [mailto:support@sa...]
Sent: Wednesday, October 05, 2005 5:51 PM
To: Premal Desai
Subject: RE: Cannot import library module using URL



Firstly, could you please note that the correct way to post problems on Saxon-B is the
saxon-help list or forum at sourceforge. This enables other users to contribute to the
solution and to have access to the responses, and it also helps me track the history.
 
The error message you are getting suggests strongly that the module has been successfully
fetched via the URI given, but that its syntax is incorrect for a library module. A library
module must start with the declaration "module namespace ...", and Saxon is saying that it
did not find this syntax but instead found <element>. What is actually in the module?
 
I know this explanation doesn't match your claim that it worked when the module was
accessed using a different URI, but the syntax error message is very explicit. If it had
failed to fetch the module you would get a quite different message, as you could verify by
putting in a bad URI. Perhaps it wasn't actually the same module?
 
Michael Kay
http://www.saxonica.com/


 

---------------------------------
From: Premal Desai [mailto:premal.desai@we...]
Sent: 05 October 2005 22:12
To: support@sa...
Subject: [Norton AntiSpam] Cannot import library module using URL



Hello,
 
I have hit the wall with this problem -
I have a main module that is unable to import  a library module because of the URL I am
supplying  in the module import statement. As a result, I cannot execute my function that's
referenced. My import module statement is as:
 
import module namespace m1 = "xxx" at
"http://localhost:8081/weblayers-center/web/xquery_service_ui.wl?operation=GetXQueryModule&id=4028489406c250610106c252d9a60002";
m1:f()
 
This URL, when referenced in the browser,  returns the library module as text (as
expected). However, when I run my JUnit test to compile the above XQuery, I get the
following error from SAXON8.5;

Error on line 4 column 1 of
http://localhost:8081/weblayers-center/web/xquery_service_ui.wl?operation=GetXQueryModule&id=4028489406c250610106c252d9a60002:

XPST0003: XQuery syntax error in #
<#:
expected "module namespace", found "<element>"

Can you please suggest/advise on what I can try to get my main module to import the library
module using the above url? It is important that we access it this way. Please note that I
have tried out the following:
 
1. Instead of having the library module returned from the web service (in the above url), I
simply stored it in a text file and accessed it as via URL. That was imported successfully
in the main module
 
import module namespace m1 = "xxx" at
http://localhost:8081/weblayers-center/xquery-lib/test.xq";
m1:f()
Status: This Works
 
2. Instead of having the library module returned from the web service (in the above url), I
simply stored it in a text file and accessed it as via file URL. That was imported
successfully in the main module 
import module namespace m1 = "xxx" at "file:///C:/weblayers-center/xquery-lib/test.xq";
m1:f()
Status: This Works


 
 
3. I also tried escaping my URL. But that does not work either. Modified my url to:
 
import module namespace m1 = "xxx" at
"http://localhost:8081/weblayers-center/web/xquery_service_ui.wl?operation=GetXQueryModule&amp;id=4028489406c250610106c252d9a60002";
m1:f()

Status: That does not work. Got the same error message from Saxon as shown above.
 
Also note that I am using open source Saxon 851.
 
Any help will be appreciated.
Thank You.
premal

 
 


---------------------------------
Yahoo! for Good
  Click here to donate to the Hurricane Katrina relief effort.

    From: Michael Kay <mike@sa...>
    RE: RE: Cannot import library module using URL  
    2005-10-06 08:18
     
     
     
     I can't specifically relate this to the symptoms you are seeing but one
     possible cause of trouble is the ampersand in the URI. An ampersand in a
     URILiteral is not legal unless it is escaped as &amp; - however, I'm not
     sure that Saxon is enforcing this correctly.
      
     Is there any chance you can put this up on a public web server so I can
     investigate it? If I can't reproduce the problem, I'm unlikely to be able to
     solve it.
      
     I'm confused by your statement that the library module contains a line of
     erroneous code. If that's the case, wouldn't you expect a Saxon error
     message?
      
     Michael Kay
     Saxonica
     
     
       _____  
     
     From: saxon-help-admin@li...
     [mailto:saxon-help-admin@li...] On Behalf Of Premal Desai
     Sent: 06 October 2005 15:22
     To: saxon-help@li...
     Subject: [saxon] RE: Cannot import library module using URL
     
     
     Dear Mr. Kay,
      
     I just reconfirmed that the library module contents are the same in all the
     cases. The error messages in all the listed scenarios are not different.
      
     The library module contains a very simple function with no parameters and
     one line of erroneous code (written deliberately) so that when accessed, my
     JUnit test can display the error message and confirm that it is able to
     access the function and in turn, reference the library module successfully.
      
     Library Module Contents:
     module namespace md1 = "xxx"; declare function md1:f(){ $doc}; 
      
     Main Module contents are in my very first mail that reports the
     problem(below).
     
     
      
     
       _____  
     
     From: Michael Kay [mailto:support@sa...] 
     Sent: Wednesday, October 05, 2005 5:51 PM
     To: Premal Desai
     Subject: RE: Cannot import library module using URL
     
     
     Firstly, could you please note that the correct way to post problems on
     Saxon-B is the saxon-help list or forum at sourceforge. This enables other
     users to contribute to the solution and to have access to the responses, and
     it also helps me track the history.
      
     The error message you are getting suggests strongly that the module has been
     successfully fetched via the URI given, but that its syntax is incorrect for
     a library module. A library module must start with the declaration "module
     namespace ...", and Saxon is saying that it did not find this syntax but
     instead found <element>. What is actually in the module?
      
     I know this explanation doesn't match your claim that it worked when the
     module was accessed using a different URI, but the syntax error message is
     very explicit. If it had failed to fetch the module you would get a quite
     different message, as you could verify by putting in a bad URI. Perhaps it
     wasn't actually the same module?
      
     Michael Kay
     http://www.saxonica.com/
     
     
      
     
       _____  
     
     From: Premal Desai [mailto:premal.desai@we...] 
     Sent: 05 October 2005 22:12
     To: support@sa...
     Subject: [Norton AntiSpam] Cannot import library module using URL
     
     
     Hello,
      
     I have hit the wall with this problem - 
     I have a main module that is unable to import  a library module because of
     the URL I am supplying  in the module import statement. As a result, I
     cannot execute my function that's referenced. My import module statement is
     as:
      
     import module namespace m1 = "xxx" at
     "http://localhost:8081/weblayers-center/web/xquery_service_ui.wl?operation=G
     etXQueryModule
     <http://localhost:8081/weblayers-center/web/xquery_service_ui.wl?operation=G
     etXQueryModule&id=4028489406c250610106c252d9a60002>
     &id=4028489406c250610106c252d9a60002";
     m1:f()
      
     This URL, when referenced in the browser,  returns the library module as
     text (as expected). However, when I run my JUnit test to compile the above
     XQuery, I get the following error from SAXON8.5;
     Error on line 4 column 1 of
     http://localhost:8081/weblayers-center/web/xquery_service_ui.wl?operation=Ge
     tXQueryModule
     <http://localhost:8081/weblayers-center/web/xquery_service_ui.wl?operation=G
     etXQueryModule&id=4028489406c250610106c252d9a60002>
     &id=4028489406c250610106c252d9a60002:
     
     XPST0003: XQuery syntax error in #
     <#:
     expected "module namespace", found "<element>"
     
     Can you please suggest/advise on what I can try to get my main module to
     import the library module using the above url? It is important that we
     access it this way. Please note that I have tried out the following:
      
     1. Instead of having the library module returned from the web service (in
     the above url), I simply stored it in a text file and accessed it as via
     URL. That was imported successfully in the main module
      
     import module namespace m1 = "xxx" at
     http://localhost:8081/weblayers-center/xquery-lib/test.xq";
     m1:f()
     Status: This Works
      
     2. Instead of having the library module returned from the web service (in
     the above url), I simply stored it in a text file and accessed it as via
     file URL. That was imported successfully in the main module 
      
     import module namespace m1 = "xxx" at
     "file:///C:/weblayers-center/xquery-lib/test.xq";
     m1:f()
     Status: This Works
      
      
     3. I also tried escaping my URL. But that does not work either. Modified my
     url to:
     
      
     import module namespace m1 = "xxx" at
     "http://localhost:8081/weblayers-center/web/xquery_service_ui.wl?operation=G
     etXQueryModule
     <http://localhost:8081/weblayers-center/web/xquery_service_ui.wl?operation=G
     etXQueryModule&amp;id=4028489406c250610106c252d9a60002>
     &amp;id=4028489406c250610106c252d9a60002";
     m1:f()
     Status: That does not work. Got the same error message from Saxon as shown
     above.
      
     Also note that I am using open source Saxon 851.
      
     Any help will be appreciated.
     Thank You.
     premal
      
      
     
     
     
       _____  
     
     Yahoo! for Good
     Click  <<A href="http://store.yahoo.com/redcross-donate3/>" target=_NEW>http://store.yahoo.com/redcross-donate3/> here to donate to the
     Hurricane Katrina relief effort. 
    

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com