This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: Selecting between multiple stylesheets on same xml file (apache/cocoon)


What do you mean by JS?....serverside javascript or
Java server Pages (JSP)? I've got PHP module/engine on
apache. I guess I could use it to generate an xsl but 
don't see the point really? I mean if the XML can be
made to accept a variable containing the name of the
XSL stylesheet to use, the stylesheets never have to
change. Just make 'em once and forget about them. Only
the content of the feed itself will change. I guess??

I'm just thinking about performance and delays. I mean
the PDA will be wireless and the transfer speed and
bandwidth will be crap anyway, so the less delay in
generating dynamic stuff on the server the better I
guess?

I dunno... I'm only in this course about 11 months. My
undergrad degree had nothing to do with computers or
IT, so I guess i'm a new and inexperienced in coding
myself ;P


 --- "Hewko, Doug" <Doug.Hewko@ccra-adrc.gc.ca> wrote:
> Just a question, can you use JS or ASP, or some
> other server-side language
> to generate the XSL for you? That definitely should
> allow you to accomplish
> what you want. JS is supported by Tomcat.
> 
> I am quite sure that you can not have the XSL loaded
> dynamically as you
> desire, but then I'm not really an expert. (Learning
> and trying.) 
> 
> Just a thought...
> 
> > -----Original Message-----
> > From: M M [mailto:mjm1project@yahoo.co.uk]
> > Sent: September 5, 2001 2:43 PM
> > To: XSL-List@lists.mulberrytech.com
> > Subject: [xsl] Selecting between multiple
> stylesheets on same xml file
> > (apache/cocoon)
> > 
> > 
> > Hi... first I want to say thanx to those who
> solved my
> > xsl variable problem. Now I'm asking if there's a
> > similar way to declare and pass an external value
> to a
> > variable in the XML document itself.
> > I'm using an apache/cocoon setup, with an xml
> newsfeed
> > of about 5/6 categories of stories. With perhaps
> with
> > php script, I want to detect the user's platform,
> eg
> > normal desktop/laptop, PocketPC, Palm, etc using
> > HTTP_USER_AGENT, also category(s) of user's news
> > preferences, particular story etc, then select the
> > appropriate xsl stylesheet to serve up content
> > particular to their needs.
> > At the moment, i'm using several copies of the
> same
> > xml file referencing different stylesheets, and
> > obviously this is ridiculous! What I want to do is
> > something like this:
> > 
> > <?xml version="1.0" encoding="iso-8859-1"?>
> > <?xml-stylesheet href="$xyz.xsl" type="text/xsl"?>
> > <?cocoon-process type="xslt"?>
> > 
> > where $xyz is a variable which can be declared in
> the
> > xml file some way similar to the way I'm using
> > <xsl:param> to construct variables in the xsl that
> can
> > pick up values passed by a php script or appended
> to a
> > url e.g
> http://myserver.com/news.xml?xyz=stylesheet1
> > 
> > Thanks!
> > 
> > P.S. Am I approaching this wrong? Should there be
> just
> > one stylesheet reference in the xml, and then in
> the
> > stylesheet itself use variables to select between
> > diffent @import locations and have all the
> specific
> > templates in small external xsl files?
> > 
> > 
> >
>
____________________________________________________________
> > Do You Yahoo!?
> > Get your free @yahoo.co.uk address at
> http://mail.yahoo.co.uk
> > or your free @yahoo.ie address at
> http://mail.yahoo.ie
> > 
> >  XSL-List info and archive: 
> http://www.mulberrytech.com/xsl/xsl-list
> > 
> 
>  XSL-List info and archive: 
> http://www.mulberrytech.com/xsl/xsl-list
>  

____________________________________________________________
Do You Yahoo!?
Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk
or your free @yahoo.ie address at http://mail.yahoo.ie

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]