Search XML with HTML Form

Discussion in 'XML' started by zakhirn@gmail.com, Sep 8, 2006.

  1. Guest

    Hello,

    I have an extremely new user to XML and XSL, and I would like to know
    how to search XML data via a input form in HTML, and have the results
    displayed in HTML.

    If anyone has code that can do that, could you please post the relevant
    files. I have searched the internet for a while now, and have been
    completely unsuccessful. I would like to do it using javascript in my
    XSL file if possible, or using CGI script to search the XML file and
    display the results.

    Any help would be much appriciated. Thanks a lot!

    Zakhir
    , Sep 8, 2006
    #1
    1. Advertising

  2. Thommo Guest

    wrote:
    ...
    > I have an extremely new user to XML and XSL, and I would like to know
    > how to search XML data via a input form in HTML, and have the results
    > displayed in HTML.
    >
    > If anyone has code ..


    Will 'Klingon' do?

    >...that can do that, could you please post the relevant
    > files. I have searched the internet for a while now,


    *

    >...and have been
    > completely unsuccessful. I would like to do it using javascript


    <http://groups.google.com/group/comp.lang.javascript>

    >..in my XSL file if possible, or using CGI ..


    <http://groups.google.com/group/comp.infosystems.www.authoring.cgi>

    >...script to search the XML file and
    > display the results.
    >
    > Any help would be much appriciated.


    Try the people who might deal with the languages you
    requested (this is a usenet newsgroup for the *Java*
    programming langauge) but you might help them
    to help you by ..
    * mentioning the search term used.

    Andrew T.
    Thommo, Sep 9, 2006
    #2
    1. Advertising

  3. Thommo Guest

    Thommo wrote:

    > Try the people who might deal with the languages you
    > requested (this is a usenet newsgroup for the *Java*
    > programming langauge)


    ....D'Ohhhhh!

    (embarrassed grin) Just popped by, and forgot where I
    was. My deepest apologies to the OP, and for the waste
    of bandwidth..

    Andrew T.
    Thommo, Sep 9, 2006
    #3
  4. Peter Flynn Guest

    wrote:
    > Hello,
    >
    > I have an extremely new user to XML and XSL, and I would like to know
    > how to search XML data


    You need an XML search engine. There are many available, from little
    free hand-made ones, right up to multi-million dollar ones for big
    corporations.

    > via a input form in HTML, and have the results displayed in HTML.


    How you gather the user's query, and how you display the results
    can be done a gazillion different ways, but a common one is:

    a) normal HTML <input> in a form
    b) data is sent to a script
    c) script checks query for acceptability and either rejects query
    or passes it to search engine
    d) search engine returns results, either in HTML, or XML, or some
    other format (eg TAB-delimited text)
    e) script translates the search-engine output into HTML and sends
    the result back to the user's browser.

    > If anyone has code that can do that, could you please post the relevant
    > files. I have searched the internet for a while now, and have been
    > completely unsuccessful. I would like to do it using javascript in my
    > XSL file if possible, or using CGI script to search the XML file and
    > display the results.


    I don't see what Javascript in an XSL file would have to do with it.

    If you want to invent your own, and it's just on a single file with
    minimal markup, you could just use grep in your script. But it won't
    be as reliable as using an XML-compliant search tool.

    ///Peter
    --
    XML FAQ: http://xml.silmaril.ie/
    Peter Flynn, Sep 9, 2006
    #4
  5. Peter Flynn wrote:
    > You need an XML search engine.


    Or an XPath, XSLT, or XQuery implementation, and code to convert your
    form input into the appropriate operation. (I'd suggest the latter two
    since they also cover formatting the data you've found.)


    >>I would like to do it using javascript in my
    >> XSL file if possible


    If you're already using XSLT, you've already got the basic tools you
    need, except for the step that turns the form input into an appropriate
    stylesheet.

    --
    () ASCII Ribbon Campaign | Joe Kesselman
    /\ Stamp out HTML e-mail! | System architexture and kinetic poetry
    Joe Kesselman, Sep 9, 2006
    #5
    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. Sachin

    HTML form to XML form

    Sachin, Sep 28, 2006, in forum: Java
    Replies:
    2
    Views:
    368
    Andrew Thompson
    Sep 28, 2006
  2. Sachin
    Replies:
    1
    Views:
    2,975
    Simon Brooke
    Sep 29, 2006
  3. Perchance
    Replies:
    3
    Views:
    578
    J.O. Aho
    Jan 18, 2007
  4. Matt
    Replies:
    3
    Views:
    330
    Bob Barrows [MVP]
    Apr 23, 2004
  5. Abby Lee
    Replies:
    5
    Views:
    378
    Abby Lee
    Aug 2, 2004
Loading...

Share This Page