Re: Selective parsing of elements

Nicolas MONNET (nico@echange.fr)
Fri, 23 Oct 1998 20:52:08 +0200 (MET DST)


On Fri, 23 Oct 1998 RJA@dip.co.uk wrote:

> Could you expand a little bit more on your requirements as its sounds quite
> like a project I'll working on.
>
> 1. Who are you passing the tags on to, another part of the your application
> ?

Hm, nope, another XML app or HTML files/cgi/servlets

> 2. How do you want to locate the tags. eg. do you want the name tag within
> an person ala XSL ?

Ah, well, I don't think I understand this. Do you mean, if I want to
handle element <INPUT>, do I want it only from inside <FORM></FORM> ?
Well, I don't really care.

> 3. What langugue etc are you looking.

Hm ... I don't see that as an issue?

Lemme detail this:

Well basically the idea is to have a sort of server-side includes on
steroids. Currently, I'm using a handcrafted perl parser to do the
following:

<IF CONDITION=full FIELD=username>Print some stuff</IF>
<IF CONDITION=empty FIELD=username>Print some other stuff</IF>
<OUTPUT FIELD=username />
<INPUT TYPE=text FIELD=username />

etc ... etc ...

and have my lib fill in the stuff.

I want to be able to add sensible tags, handle server-side form entry
verification in the template, etc.

Now, when I want to be able to have this (or something along those lines):

<?xml version="1.0" ?>
<BODY BGCOLOR=white>
<FORM DATASOURCE="jdbc:mysql:whatever" TABLE=userlist IDCOLUMN=id>
<B BOGUS=parameter>Your name is :</B> <!-- this gets passed 'as is' -->
<INPUT FIELD=username TYPE=text REQUIRE=full /><!-- the library inserts
a value field here -->

</FORM>
</BODY>

The program would handle FORM, FORM/INPUT, and pass BODY, B, and the rest
'as is', with the SAME whitespace in the tag, for example.

Comments?

But I guess I'll go for saxon, as soon as I can understand it.