Menu

Static error in query: Exception in ModuleURI

Help
ggdepaz
2011-09-06
2012-10-08
  • ggdepaz

    ggdepaz - 2011-09-06

    Hi,

    I'm trying to pass one parameter by command line & executing one xquery, but
    one error is shown, here is the command introduced, the parameter has been
    called as arg1:

    query -q:FINAL_cruces_2_0_1.xq -p:on -o:FINAL.XML -t arg1="0037050-801"

    here is the xquery:

    xquery version "1.0";

    declare variable $arg1 external;

    <appcf_upd>
    {
    for $PNR in doc("PNR_REP.xml")/dataroot/PNR_REP/EQPN
    where $PNR=$arg1
    return $PNR/text()
    }
    </appcf_upd>

    & the xml

    <dataroot xmlns:od="urn:schemas-microsoft-com:officedata" generated="2011-09-01T18:52:32"> <PNR_REP> <EQPN>0037020-801</EQPN> </PNR_REP> <PNR_REP> <EQPN>0037050-801</EQPN> </PNR_REP> </dataroot>

    Error:

    Saxon-HE 9.3.0.5N from Saxonica
    .NET 2.0.50727.1433 on Microsoft Windows NT 5.1.2600 Service Pack 2
    Analyzing query from FINAL_cruces_2_0_1.xq
    Static error in query: Exception in ModuleURIResolver:

    What is happening?

     
  • Michael Kay

    Michael Kay - 2011-09-06

    I'm afraid I haven't the faintest idea! It's a very strange one. Presumably
    you are running from the command line, and without an "import module" it's
    hard to see where the ModuleURIResolver comes into it. Do you get the problem
    when you run any query? Is it specific to queries that specify an argument on
    the command line? Is there anything unusual about the file from which the
    query comes?

     
  • Michael Kay

    Michael Kay - 2011-09-06

    Does the problem go away if you remove the -p option from the command line?

     
  • ggdepaz

    ggdepaz - 2011-09-07

    OK, it works removing -p option. Thanks a lot