newbie xslt - retreiving data from a form

M

Marty Gagnon

I've been looking into xml/xslt as a solution for seperating presentation from
data. It looks like what I want but I have one question. Once the form
has been rendered, and the user enters some information into the form, how
do I extract the data from the form back into xml?
I thought when the post happens I could use the namespace of the form's input
fields know how to build the xml, but I think there must be a better way.

This is basically what I want to do:

---- Here is the data -----------
<cd>
<title>Fables of a Reconstruction</title>
<artist>REM</artist>
</cd>
<cd>
<title>WAR</title>
<artist>U2</artist>
</cd>

---------------------------
then using xslt render a form with the title and artist
in <INPUT TYPE="Text" which can be modified,
---------------------------

Title : [Fables of a Reconstruction]
Artist : [REM]

Title : [ Rattle and Hum ]
Artist : [U2]

[SUBMIT BUTTON]

--------------------------
and then when the submit happens
I want to get the new values out of the form and put them
back into xml WITH THE MODIFIED INFORMATION
--------------------------
<cd>
<title>Fables of a Reconstruction</title>
<artist>REM</artist>
</cd>
<cd>
<title>Rattle and Hum </title>
<artist>U2</artist>
</cd>
 
M

Martin Honnen

Marty said:
I've been looking into xml/xslt as a solution for seperating presentation from
data. It looks like what I want but I have one question. Once the form
has been rendered, and the user enters some information into the form, how
do I extract the data from the form back into xml?

XSLT doesn't know about HTML forms or HTTP form submission so you need
to employ your favourite server side programming language/technique
(e.g. PHP or ASP or JSP or Perl CGI) to process the submitted form data
and update the XML as needed.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,999
Messages
2,570,243
Members
46,836
Latest member
login dogas

Latest Threads

Top