You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Axel Honfi <e9...@student.tuwien.ac.at> on 2002/03/07 15:01:23 UTC

(re)acting on XML-Data

Hello!

For user-authentication I use the XMLDBSourceFactory with a query for
username/password.
The result looks something like this:

<?xml version="1.0" encoding="UTF-8"?>
<collection:results query="/user[username='xy'][password='xy']"
resources="1" 						xmlns:collection="http://apache.org/cocoon/xmldb/1.0">
<collection:result docid="xy">
	<user xmlns:src="http://xml.apache.org/xindice/Query" src:col="/db/xy/xy"
src:key="xy">
		<fname>X</fname>
		<sname>Y</sname>
		<username>xy</username>
		<password>xy</password>
	</user>
</collection:result>
</collection:results>

or

<?xml version="1.0" encoding="UTF-8"?>
<collection:results query="/user[username='xy'][password='xy']"
resources="0" 						xmlns:collection="http://apache.org/cocoon/xmldb/1.0"/>

Now I need to create a session based upon the existance of the xml-data or
the value of "@resources" == 1.

Is there an easy way or do I have to write my own action? And how do I get
the xml-data in an action?

Thanks in advance

Axel


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>