qexo-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qexo-general] Parent Navigation


From: Sascha Opletal
Subject: [Qexo-general] Parent Navigation
Date: Sun, 30 Nov 2003 01:32:51 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030624

I am very grateful for the help this list provides, especially Per Bothner.

The (hopefully) last Problem i have with Qexo is the parent navigation.

The Data is:

<a>
<b c="1" d="3">1</b>
...
</a>

Now i want to go over the c-Values (there are more than one b-element in real data).

I use this:

for $a in doc("data2.xml")/a/b/@c

return
<result>
{$a}
{$a/../@d} </result>

Besides attaching the /a/b/@c, i also want to attach the relevant attribute @d in context.
The line
{$a/../@d}
Gives the following error:

java.lang.ArrayIndexOutOfBoundsException: 2146304153
       at gnu.lists.TreeList.getNextKind(TreeList.java:1229)
       at gnu.kawa.xml.NodeType.isInstance(NodeType.java:75)
       at gnu.kawa.xml.NodeType.isInstancePos(NodeType.java:70)
       at gnu.kawa.xml.ParentAxis.scan(ParentAxis.java:22)
       at gnu.kawa.xml.TreeScanner.apply(TreeScanner.java:40)
       at gnu.mapping.CallContext.runUntilDone(CallContext.java:289)
       at gnu.mapping.CallContext.runUntilValue(CallContext.java:353)
       at gnu.mapping.CpsProcedure.applyV(CpsProcedure.java:49)
       at gnu.mapping.CpsProcedure.applyN(CpsProcedure.java:25)
       at gnu.mapping.ProcedureN.apply1(ProcedureN.java:31)
       at atInteractiveLevel.apply(query5.xql:7)
       at gnu.mapping.CallContext.runUntilDone(CallContext.java:289)
       at gnu.expr.ModuleExp.evalModule(ModuleExp.java:188)
       at kawa.Shell.run(Shell.java:233)
       at kawa.standard.load.loadSource(load.java:162)
       at kawa.standard.load.apply(load.java:275)
       at kawa.Shell.runFile(Shell.java:298)
       at kawa.repl.processArgs(repl.java:231)
       at kawa.repl.main(repl.java:634)


How do i access the other attribute which is parallel to the first, without changing the for-loop?

Thank you for your help!





reply via email to

[Prev in Thread] Current Thread [Next in Thread]