A simple XML & XSLT based Web Form

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • el_bandido@nospam.com

    A simple XML & XSLT based Web Form

    Hello,

    I've tried the FAQ and some minutes in googl'ing but was not happy with
    what I got. Basically I'd like to get a _simple_ example on how I could
    create a web based (portable across all platforms and applications) form
    for a simple web application using XML technologies.

    I would like to have something like follows:

    An XML DB containing that looks roughly like follows:

    <?xml version="1.0" encoding="UTF-8"?>
    <!-- my foobar DB --!>
    <MY_FOORBAR_D B>
    <ITEM title="../aaa/bbb.ext">
    <KEYWORDS> Credite, Pisones, isti, tabulae, fore </KEYWORDS>
    </ITEM>
    <ITEM title="../ccc/aaa.ext">
    <KEYWORDS> librum, persimilem, cuius, uelut, aegri </KEYWORDS>
    </ITEM>
    <ITEM title="../bbb/aaa.ext">
    <KEYWORDS> somnia, uanae, fingentur, species, ut, nec </KEYWORDS>
    </ITEM>
    <ITEM title="../ddd/bbb.ext">
    <KEYWORDS> pes, nec, caput, uni, reddatur, formae </KEYWORDS>
    </ITEM>
    </MY_FOOBAR_DB>

    An index.xml which would basically be like an index.html with a query
    form and a SUBMIT button as input type like follows:

    Please enter keywords to search: _______________ __________ [SUBMIT]

    Which would then create an appropriate XSLT file (using the keywords as
    search parameters) _and_ call the XML DB with it, resulting in the
    display of the selected ITEMS which contain the AND and OR match of the
    submitted keywords.

    In a second stage I'd like to add a form which takes an ITEM and a
    variable amount of KEYWORDSs and adds it to the XML DB dynamically, when
    hitting SUBMIT.

    I know that I can do this with perl, python, bash, c, <insert other no
    portable languages> but I thought that using a meta language would be an
    interesting approach to solve this problem. Unfortunately I have not
    found a simple enough example that would show me the solution to this
    problem.

    Basic questions for me right now (until I get the picture) are:

    1. Can XML & XSLT be used to generate persistent files using IIS or
    apaches as web servers and firefox or IE as clients?
    2. Is regexp possible with XSLT?
    3. How are Unicode characters passed as arguments to the XSLT processor?

    Best regards,
    Roberto Nibali, ratz
    --
    echo
    '[q]sa[ln0=aln256%Pln2 56/snlbx]sb3135071790101 768542287578439 snlbxq' | dc
  • Tjerk Wolterink

    #2
    Re: A simple XML &amp; XSLT based Web Form

    el_bandido@nosp am.com wrote:
    [color=blue]
    > Hello,
    >
    > I've tried the FAQ and some minutes in googl'ing but was not happy with
    > what I got. Basically I'd like to get a _simple_ example on how I could
    > create a web based (portable across all platforms and applications) form
    > for a simple web application using XML technologies.
    >
    > I would like to have something like follows:
    >
    > An XML DB containing that looks roughly like follows:
    >
    > <?xml version="1.0" encoding="UTF-8"?>
    > <!-- my foobar DB --!>
    > <MY_FOORBAR_D B>
    > <ITEM title="../aaa/bbb.ext">
    > <KEYWORDS> Credite, Pisones, isti, tabulae, fore </KEYWORDS>
    > </ITEM>
    > <ITEM title="../ccc/aaa.ext">
    > <KEYWORDS> librum, persimilem, cuius, uelut, aegri </KEYWORDS>
    > </ITEM>
    > <ITEM title="../bbb/aaa.ext">
    > <KEYWORDS> somnia, uanae, fingentur, species, ut, nec </KEYWORDS>
    > </ITEM>
    > <ITEM title="../ddd/bbb.ext">
    > <KEYWORDS> pes, nec, caput, uni, reddatur, formae </KEYWORDS>
    > </ITEM>
    > </MY_FOOBAR_DB>
    >
    > [cut][/color]

    I did not read your whole story but i think it is better to store your keywords like this:

    <item title="../aa/bb.ext">
    <keywords>
    <keyword>Credit e</keyword>
    <keyword>Pisone s</keyword>
    <keyword>Isti </keyword>
    </keywords>

    This is better because in your case you are separating information elements using your own comma like
    markup syntax. But the whole reason d'existance of xml is to markup information elements.

    Nice word: reason d'existance :-)

    Comment

    • el_bandido@nospam.com

      #3
      Re: A simple XML &amp; XSLT based Web Form

      > I did not read your whole story but i think it is better to store your[color=blue]
      > keywords like this:
      >
      > <item title="../aa/bb.ext">
      > <keywords>
      > <keyword>Credit e</keyword>
      > <keyword>Pisone s</keyword>
      > <keyword>Isti </keyword>
      > </keywords>[/color]

      Indeed, thanks. It would be kind of stupid to have the XLST processor do
      commata stripping and try to do pattern matching on a variable amount of
      parameters.
      [color=blue]
      > This is better because in your case you are separating information
      > elements using your own comma like
      > markup syntax. But the whole reason d'existance of xml is to markup
      > information elements.[/color]

      Correct, so my original request remains, but of course with your version
      of separating information elements.
      [color=blue]
      > Nice word: reason d'existance :-)[/color]

      Horace salutes you ;).

      Cheers,
      Roberto Nibali, ratz
      --
      echo
      '[q]sa[ln0=aln256%Pln2 56/snlbx]sb3135071790101 768542287578439 snlbxq' | dc

      Comment

      • Joris Gillis

        #4
        Re: A simple XML &amp; XSLT based Web Form

        Tempore 11:04:00, die Friday 11 February 2005 AD, hinc in foro {comp.text.xml} scripsit Tjerk Wolterink <tjerk@wolterin kwebdesign.com> :
        [color=blue]
        > Nice word: reason d'existance :-)[/color]

        Shouldn't that be: raison d'existance?

        --
        Joris Gillis (http://www.ticalc.org/cgi-bin/acct-v...i?userid=38041)
        Veni, vidi, wiki (http://www.wikipedia.org)

        Comment

        • Morris

          #5
          Re: A simple XML &amp; XSLT based Web Form

          Actually, it's "existence" but the correct expression is "raison d'être".

          "Joris Gillis" <roac@pandora.b e> a écrit dans le message de
          news:opsl07jklk yf9v9r@news.pan dora.be...[color=blue]
          > Tempore 11:04:00, die Friday 11 February 2005 AD, hinc in foro[/color]
          {comp.text.xml} scripsit Tjerk Wolterink <tjerk@wolterin kwebdesign.com> :[color=blue]
          >[color=green]
          > > Nice word: reason d'existance :-)[/color]
          >
          > Shouldn't that be: raison d'existance?
          >
          > --
          > Joris Gillis (http://www.ticalc.org/cgi-bin/acct-v...i?userid=38041)
          > Veni, vidi, wiki (http://www.wikipedia.org)[/color]


          Comment

          Working...