You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Mike Engelhart <me...@earthtrip.com> on 2000/03/09 16:31:23 UTC
advice
After working with XSP for over a month, I have run into a lot of situations
where I feel like either I just don't understand the paradigm shift from
HTML -> XML/XSLT or the separation of data from content/style isn't there (i
think it's probably the former :-)). For example, in my HTML pages, I
always need <SELECT> objects that hold things like the time of day where the
HTML would look like:
<SELECT NAME="TIME1">
<OPTION VALUE="8A">8:00 am</OPTION>
<OPTION VALUE ="9A">9:00 am</OPTION>
....etc....
</SELECT>
I also need to have sometimes 2 or 3 or more of these type items one page,
all displaying the exact same data except that their NAME attributes are
different. Also when a user submits a form, I process the incoming request
and if one of the form elements (including text fields, etc) are not valid,
I recreate the form with all of the user input settings that are correct and
flag only the bad ones for them to change. Doing this the way I currently
am is a complete hassle and requires me to put a LOT of presentation
information into my XSP's because I need to tell the XSL processor which
item was last selected from a menu so I can set it's SELECTED attribute
correctly.
There are many other problems I'm running into as well where it seems like I
should be sharing the XML elements but I'm ending up with tons of them
flying around even though except for a few minor things, they are not
different elements. In the above time example, can anyone show me a way to
handle this for all my pages where I only need to have one
<TIME>
<ITEM>
<NAME>8:00 AM</NAME>
<VALUE>8A</VALUE>
</ITEM>
......etc......
</TIME>
for all my XSP documents and can share them throughout my site, but at the
same time allow for the needs I stated above ( redisplaying forms, etc.).
thanks for your help - sorry for such a long post.
Mike