xml-xindice-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lavon_Lof...@pap.state.ga.us
Subject XPATH query roubles - attribute values
Date Mon, 07 Jun 2004 17:51:44 GMT
Hello.

I'm attempting to use XPath to return attribute values from the document
store. I'm using 1.1b4.




the first query return the value of the type attribute within the
xq:result.

C:\xindice-1.1b4\bin>xindice xpath -c
xmldb:xindice://localhost:8080/db/ecoavs0.2 -q "/exec:Exhibit
[@exec:ownerRef='_678919600101martian' and @type='PARDON']/@type"
trying to register database
<xq:result type="PARDON" xmlns:xq="http://xml.apache.org/xindice/Query"
xq:col="/db/ecoavs0.2" xq:key="f2aadbe374dd3722-35c41b-fcf19
833d6--8000" />

the next query attempts to get the value of exec:id with the following
error message
C:\xindice-1.1b4\bin>xindice xpath -c
xmldb:xindice://localhost:8080/db/ecoavs0.2 -q "/exec:Exhibit
[@exec:ownerRef='_678919600101mar
tian' and  @type='PARDON']/@exec:id"
trying to register database
[Fatal Error] :2:203: The prefix "exec" for attribute "exec:id" associated
with an element type "xq:result" is not bound.
org.xml.sax.SAXParseException: The prefix "exec" for attribute "exec:id"
associated with an element type "xq:result" is not bound.
        at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
        at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
        at
org.apache.xindice.client.xmldb.xmlrpc.CollectionImpl.query(CollectionImpl.java:518)
        at
org.apache.xindice.client.xmldb.XindiceCollection.query(XindiceCollection.java:259)
        at
org.apache.xindice.client.xmldb.services.QueryService.query(QueryService.java:90)
        at
org.apache.xindice.tools.command.XPathQuery.execute(XPathQuery.java:75)
        at org.apache.xindice.tools.XMLTools.execute(XMLTools.java:293)
        at org.apache.xindice.tools.XMLTools.process(XMLTools.java:171)
        at org.apache.xindice.tools.XMLTools.main(XMLTools.java:82)
ERROR : Query error: The prefix "exec" for attribute "exec:id" associated
with an element type "xq:result" is not bound.


If I modify the same query by removingthe namespace from the ID attribute
name the query does not return a xq:result - which I assume indicates that
the query did select any output.
C:\xindice-1.1b4\bin>xindice xpath -c
xmldb:xindice://localhost:8080/db/ecoavs0.2 -q "/exec:Exhibit
[@exec:ownerRef='_678919600101mar
tian' and  @type='PARDON']/@id"
trying to register database
C:\xindice-1.1b4\bin>

I do not understand the cause of the "...is not bound." error above. Can
anyone enlighten me?

Thanks


Mime
View raw message