[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qexo-general] Include, Http Post
From: |
Terje Pedersen |
Subject: |
[Qexo-general] Include, Http Post |
Date: |
Sun, 13 Jul 2003 16:41:44 +0200 |
User-agent: |
KMail/1.5.1 |
I started using Qexo on friday testing xquery not just reading about it
anymore and to see if it could be usefull for my projects. My current web
development is based on php with all content in xml, transforming it using
the sablot xslt extension. So the first I tested was letting php generating
some xml code and using the url with doc() which worked as I guessed it would
:)
I N C L U D E
Is there or would it be some function to include other .xql files like
xsl:include in xsl or include() in php?
Is it possible to compile an xql program and use functions from this class
just like you can do with java, scm classes? I have tested using functions
written in a custom scm class from xql which worked on the command line but
for some reason I didn't get i working with tomcat ie. from a servlet.
H T T P P O S T
I needed atleast HTTP POST so I added the following lines to KawaServlet.java
public void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException
{
doGet(request,response);
}
Which makes it also possible to post form data. But what I really would like
to have is a function returning the posted form data as xml so that I can
treat it just like an xml document with the possibilty to lets say join it
with some other xml data.
<form method="post" name="vote" action="#">
<input type="radio" name="answer" value="true"/>yes<br/>
<input type="radio" name="answer" value="false"/>no<br/>
<input type="submit" name="button" value="Vote"/>
</form>
==>
<vote>
<answer>true</answer>
<button>Vote</button>
</vote>
I'm not certain about the possibility to extract the form name attribute, is
it possible?
Or maybe naming the input elements with slashes is better solution like this :
<input name="address/name"/>
<input name="address/postal/code"/>
==>
<address>
<name>Terje Pedersen</name>
<postal>
<code>5563</code>
</postal>
</address>
- [Qexo-general] Include, Http Post,
Terje Pedersen <=