Static error in query: Exception in ModuleURI

  • ggdepaz

    ggdepaz - 2011-09-06


    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;

    for $PNR in doc("PNR_REP.xml")/dataroot/PNR_REP/EQPN
    where $PNR=$arg1
    return $PNR/text()

    & 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>


    Saxon-HE 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


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks