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>
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>