How to do nested queries
martinez victor <[email protected]> Tue, 28 Jan 2003 12:22:23 +0100 (CET)
| Newsgroups | gmane.text.xml.sax.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi,
I need to use one attribute from a tag in the result
of a query to make a query to another document. How
can I do it?
The XSP code I use is:
<xsp:page xmlns:xsp="http://apache.org/xsp"
xmlns:xmldb="http://exist-db.org/xmldb/1.0">
<unit>
<xmldb:collection uri="xmldb:exist:///db">
<xmldb:execute>
<xmldb:xpath>
"document('/db/babelis/ExpText.xml')//ExpText[metainfo/@id"
+
"&='" +
request.getParameter("id") + "']"
</xmldb:xpath>
<xmldb:results>
<xmldb:get-xml as="xml"/>
</xmldb:results>
</xmldb:execute>
</xmldb:collection>
</unit>
</xsp:page>
In the first query the result I get is like:
<ExpText ino:id="302" exist:id="310"
exist:source="/db/babelis/ExpText.xml"
xmlns:exist="http://exist.sourceforge.net/NS/exist"
xmlns:ino="http://namespaces.softwareag.com/tamino/response2">
|
|
|
<NextSectionPageType linkedcontenttype="ExerciseType"
ref="13"/>
</ExpText>
I need to use the attribute @ref to make another
query. Can I use this value in another query in the
same XSP page?
Thanks Victor
___________________________________________________
Yahoo! Móviles
Personaliza tu móvil con tu logo y melodÃa favorito
en http://moviles.yahoo.es
-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
List: sax-devel, [email protected]
See: http://www.saxproject.org/
https://lists.sourceforge.net/lists/listinfo/sax-devel