On Tuesday, 14. January 2003 19:55, S Woodside wrote:

> > I took this approach at first, too, but it was too limiting later on.
> > My
> > current approach: Generate meta-form tags, i.e. arbitrary
> > placeholders. Use
> > one stylesheet to arrange these items the way you want, use a second
> > stylesheet to convert the meta-form tags to real html tags. This way
> > you can
> > control the design much more. The arranging stylesheet could set
> > additional
> > attributes on the meta-form tags to control visual details of the
> > conversion,
> > like the "size" or the "cols" parameters, while the second stylesheet
> > takes
> > care of generating the correct <input>/... element with appropriate
> > maxlength="" parameters and such.
>
> You mean the first stylesheet? Which does which.

My processing stack looks like this:
                XSLT 1           XSP
XML (data) file -----> XSP page -----> pure meta-form output

  XSLT 2
  ----->  nicely laid out meta-forms (i.e., meta-form+design)

  XSLT 3
  ----->  nicely laid out html-forms

  -----> more XSLT if you want/need


XSLT 1 and 3 are always the same, I wrote them once and they apply to every 
document.
The XSP step does the actual validation and updating, mostly
through a taglib for this very purpose. XSLT 2 does the actual layout, it is 
different for each xml file "type". I haven't had this before, but my 
customers had exact requirements for layout/design, so I added that step. I 
do the layout on meta-form elements because that's easier to rearrange than 
html form elements, which can get quite complex. (imagine image upload fields 
with preview or a set of checkboxes).
I didn't yet find a way to reduce the number of steps through import or 
similar... it seems like I really need 4 steps.

> > If you abandon NS4 once and for all (and IE3 of course ;-), this is
> > manageable. You need 'only' two DOM tree access functions, one for IE
[...]

> Hrmmmmmmm... I'd rather only write the code once. If going with DOM
> means writing two DOM versions, and also providing server-side code for
> people with ECMAScript off, then I think i'd rather just write the
> server side code only.

Well, after realizing this fact, I planned to write a small W3C-DOM emulation 
for IE when I do the next larger ecmascript thingy, so that the actual 
programming can happen once, while the emulation layer takes care of the icky 
browser-dependent details. If you take a similar route (not that difficult, I 
bet you don't actually use more than 4 or 5 DOM functions), you can do your 
scripting once. Of course, server side is more important.

-- 
CU
  Joerg

PGP Public Key at http://ich.bin.kein.hoschi.de/~trouble/public_key.asc
PGP Key fingerprint = D34F 57C4 99D8 8F16 E16E  7779 CDDC 41A4 4C48 6F94


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to