cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Williams, Murray Todd" <>
Subject RE: advice
Date Thu, 09 Mar 2000 15:45:56 GMT
The member of my team who does all the XSP/XSL work is away today, but from
I can understand, is there a chance that your XSP logic could be moved into
the XSL stylesheet instead of the base XML document so you can allow the XSL
to handle the redundant duplication? For the duplication of SELECT form
items, shouldn't you just put a custom <select-foo selected="name"> tag in
the XML and write your XSL so that it does the appropriate expansion and
logically puts the "SELECTED" attribute on the appropriate OPTION?

Again, I always do the design and let my poor faithful assistant figure out
the XSL/XSP, but I always start with the simplest conceptual layout for the
XML document and put all the ugly details and repetition in the XSL part.
I'm sure this doesn't help as much as you'd like.

Murray Todd Williams
Merck & Co., Inc.

 -----Original Message-----
From: 	Mike Engelhart [] 
Sent:	Thursday, March 09, 2000 10:31 AM
To:	Cocoon Users
Subject:	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:

    <OPTION VALUE="8A">8:00 am</OPTION>
    <OPTION VALUE ="9A">9:00 am</OPTION>

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

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
        <NAME>8:00 AM</NAME>

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.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message