If I'm not mistaken I ran into this problem a while ago.
If you search the list archiver you'll see it's a problem with xindice supporting searching nodes in the default namespace(no prefix).
I'd love to tell you there's an easy fix for this but there's not. In the short term, I got round this by either setting a namespace prefix, or if your
document is all in the same namespace, you could just remove the declaration.
I did say I'd have a look at this and submit a patch but I've just not had time yet. I'll try and look at it this week.
Steven Shand.
On 19 May 2004, at 00:24, Jason Kim wrote:
Hi
I am a newbie to both xindice and xpath.
I have added following document to collection /db/description and tried to test xpath with following queries
- xindice xpath –c /db/description –q /Mpeg7
- xindice xpath –c /db/description –q /Mpeg7/Description
- xindice xpath –c /db/description –q //Label
- xindice xpath –c /db/description –q /*/*
However only the last query returns result and the other return nothing.
Can someone help me fix my xml doc or my xpath query please ?
<?xml version="1.0" encoding="iso-8859-1"?>
<Mpeg7 xmlns="urn:mpeg:mpeg7:schema:2001"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:mpeg7="urn:mpeg:mpeg7:schema:2001"
xsi:schemaLocation="urn:mpeg:mpeg7:schema:2001 Mpeg7-2001.xsd">
<Description>
<Semantics>
<Label>
<Name> Running </Name>
</Label>
<SemanticBase xsi:type="AgentObjectType" id="AOa">
<Label>
<Name> Person A </Name>
</Label>
</SemanticBase>
<SemanticBase xsi:type="EventType" id="run-event">
<Label>
<Name> Running </Name>
</Label>
<Relation type="urn:mpeg:mpeg7:cs:SemanticRelationCS:2001:timeOf" target="#ST1"/>
<Definition>
<FreeTextAnnotation>
Moving at a fast speed
</FreeTextAnnotation>
</Definition>
</SemanticBase>
<SemanticBase xsi:type="SemanticTimeType" id="ST1">
<Label>
<Name>
12/11/2001 at 2:13pm
</Name>
</Label>
<Time>
<TimePoint>2001-11-12T14:13:00</TimePoint>
<Duration>PT1M</Duration>
</Time>
</SemanticBase>
<MediaOccurrence>
<MediaLocator>
<MediaUri>
http://129.94.135.174/demo.avi
</MediaUri>
</MediaLocator>
</MediaOccurrence>
</Semantics>
</Description>
</Mpeg7>