Code Monkey home page Code Monkey logo

Comments (8)

joewiz avatar joewiz commented on August 17, 2024

Could you post the collection.xconf file? This would help.

from monex.

joewiz avatar joewiz commented on August 17, 2024

A sample data file with the indexed attribute would be great too.

from monex.

wahowaho avatar wahowaho commented on August 17, 2024
    <!-- Range indexes -->
    <range>
        <create qname="@appinfo:test" type="xs:string"/>
        <create qname="xs:schema/@appinfo:test" type="xs:string"/>

    </range>
</index>

err:XPST0081 Error while evaluating expression: declare namespace xs="http://www.w3.org/2001/XMLSchema"; collection("/db/ciem")//xs:schema/@appinfo:test. No namespace defined for prefix appinfo:test [at line 211, column 42]
In function:
indexes:get-nodeset-from-qname(xs:string, xs:string) [33:65:/db/apps/monex/modules/indexes.xqm]
indexes:show-index-keys(node(), map()) [-1:-1:/db/apps/monex/modules/indexes.xqm]
templates:process-output(element(), map(
), item(), element()) [211:9:D:\eXist-db-5.2.0\data\expathrepo\shared-0.8.4\content\templates.xql]
templates:call-by-introspection(element(), map(
), map(), function()) [189:28:D:\eXist-db-5.2.0\data\expathrepo\shared-0.8.4\content\templates.xql]
templates:call(item(), element(), map()) [137:36:D:\eXist-db-5.2.0\data\expathrepo\shared-0.8.4\content\templates.xql]
templates:process(node()
, map()) [148:81:D:\eXist-db-5.2.0\data\expathrepo\shared-0.8.4\content\templates.xql]
templates:process(node()
, map()) [148:81:D:\eXist-db-5.2.0\data\expathrepo\shared-0.8.4\content\templates.xql]
templates:process(node()
, map()) [148:81:D:\eXist-db-5.2.0\data\expathrepo\shared-0.8.4\content\templates.xql]
templates:process(node()
, map()) [148:81:D:\eXist-db-5.2.0\data\expathrepo\shared-0.8.4\content\templates.xql]
templates:process(node()
, map()) [148:81:D:\eXist-db-5.2.0\data\expathrepo\shared-0.8.4\content\templates.xql]
templates:process(node()
, map()) [148:81:D:\eXist-db-5.2.0\data\expathrepo\shared-0.8.4\content\templates.xql]
templates:process(node()
, map()) [428:17:D:\eXist-db-5.2.0\data\expathrepo\shared-0.8.4\content\templates.xql]
templates:process-output(element(), map(
), item()) [230:9:D:\eXist-db-5.2.0\data\expathrepo\shared-0.8.4\content\templates.xql]
templates:process-output(element(), map(
), item(), element()) [211:9:D:\eXist-db-5.2.0\data\expathrepo\shared-0.8.4\content\templates.xql]
templates:call-by-introspection(element(), map(
), map(), function()) [189:28:D:\eXist-db-5.2.0\data\expathrepo\shared-0.8.4\content\templates.xql]
templates:call(item(), element(), map()) [137:36:D:\eXist-db-5.2.0\data\expathrepo\shared-0.8.4\content\templates.xql]
templates:process(node()
, map()) [133:51:D:\eXist-db-5.2.0\data\expathrepo\shared-0.8.4\content\templates.xql]
templates:process(node()
, map()) [90:9:D:\eXist-db-5.2.0\data\expathrepo\shared-0.8.4\content\templates.xql]
templates:apply(node()+, function(
), map()?, map()?) [43:5:D:\eXist-db-5.2.0\data\expathrepo\shared-0.8.4\content\templates.xql]

from monex.

joewiz avatar joewiz commented on August 17, 2024

Could you please post a sample data file with the indexed attribute?

from monex.

line-o avatar line-o commented on August 17, 2024

It looks like this should be moved to https://github.com/exist-db/monex as the stack trace clearly has nothing to do with the index but is thrown trying to display its contents.
/db/apps/monex/modules/indexes.xqm

from monex.

duncdrum avatar duncdrum commented on August 17, 2024

i suspect and error with the empty namespace being reset, based on the fragment posted by the OP. But we do need a full sample to reproduce. We should consider adding a test, as this kind of namespace resetting is easily triggered.

I m not yet convinced this is a bug.

from monex.

joewiz avatar joewiz commented on August 17, 2024

@SnowMakerDemo The cause of the error is that the @qname value in the following range index entry is invalid:

<create qname="xs:schema/@appinfo:test" type="xs:string"/>

The clearest description of how to use qname is in the documentation for the old range index: https://exist-db.org/exist/apps/doc/oldrangeindex#pathvsqname and @wolfgangmm's original article describing the feature: http://atomic.exist-db.org/blogs/eXist/NewIndexing.

Basically, @qname is meant to create a context-independent range index: you specify only an element name or an attribute name. So qname="xs:schema and qname="@appinfo:test" are fine, but qname="xs:schema/@appinfo:test" and qname="//inproceedings/author" are invalid.

I will see if I can get our collection.xconf.xsd schema to raise an error when a "/" character is used in @qname.

That said, the way monex handles errors could be improved. Maybe we should validate the xconf file before trying to display index contents. Or we could catch errors in the display of index contents and simply suggest opening the xconf in eXide so that a schema check can be run.

from monex.

joewiz avatar joewiz commented on August 17, 2024

@SnowMakerDemo I'll close this for now, since I think it's resolved.

from monex.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.