newbie xslt - retreiving data from a form

Discussion in 'XML' started by Marty Gagnon, Nov 30, 2004.

  1. Marty Gagnon

    Marty Gagnon Guest

    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>
    Marty Gagnon, Nov 30, 2004
    #1
    1. Advertising

  2. Marty Gagnon wrote:

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


    --

    Martin Honnen
    http://JavaScript.FAQTs.com/
    Martin Honnen, Nov 30, 2004
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    1
    Views:
    2,073
    Artur-ek
    May 23, 2005
  2. ElCapitan
    Replies:
    0
    Views:
    126
    ElCapitan
    Mar 14, 2006
  3. Jens

    Problem retreiving data from Soap message

    Jens, Jul 23, 2007, in forum: ASP .Net Web Services
    Replies:
    0
    Views:
    143
  4. Jeff

    retreiving data from html page

    Jeff, Oct 8, 2006, in forum: ASP General
    Replies:
    8
    Views:
    136
    Mike Brind
    Oct 8, 2006
  5. Angel
    Replies:
    4
    Views:
    113
    Angel
    Jul 17, 2006
Loading...

Share This Page