cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Donald Ball <>
Subject Re: XSP -> XSL or XML?
Date Wed, 06 Dec 2000 19:44:03 GMT
On Wed, 6 Dec 2000, Benjamin Dixon wrote:

> Quick question,
> I have an XSP that currently selects thing from the database dependent on
> what the user wants to see. I then send the data through an XSL stylesheet
> for their platform... all that works fine. But some of my clients are
> gonna want just the pure XML with no styling... in particular, I want to
> make this content available to macromedia flash via its XMLSocket
> interface. Is it possible to selectively style or not style content from
> an XSP? And if so, what steps should I take to do this? If thats not the
> case, I suspect I could send it through to another stylesheet that simply
> copies the XML to output but the, how can I detect a flash user-agent so
> I'll know how to send the data?

if (browser wants XML) {
  <xsp:pi target="cocoon-format">text/xml</xsp:pi>
} else {
  <xsp:pi target="cocoon-process">type="xslt"</xsp:pi>
  <xsp:pi target="xml-stylesheet">type="text/xsl" href="foo.xsl"</xsp:pi>

as far as determining the flash user-agent, i dunno. check the http
request headers and check for whatever the magic indicator is.

- donald

View raw message