cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brett McLaughlin <bmcla...@algx.net>
Subject Re: How to reveal original XML document before XSLT was applied?
Date Mon, 10 Jan 2000 00:06:54 GMT


Ted wrote:
> 
> Case:
> 
> XMLDTD1 --(XSLT) --> XMLDTD2
> 
> For example: Chemical Markup Language transformed to HTML
> 
> If I used Cocoon, then, based on the calling browser (Netscape, IE), I
> could automatically format CML into HTML by applying the appropriate
> XSLT automatically (in Cocoon's "media" setting).
> 
> Now, what if I wanted to share XMLDTD1 to another group, who would like
> to call the original document before before the transformation by
> Cocoon. For example, the new (unfamiliar) group would like to
> synchronize the chemical data from the more semantically-oriented
> XMLDTD1 rather than the formatting-oriented XMLDTD2, but the XMLDTD1
> would be coming from my group's server.
> 
> (1) Do we have mechanisms to do this, short of revealing the XSLT code?
> Do I have to duplicate the XML document, give it a different name and a
> text MIME type, and share that with the group?

If I understand your application, you will keep XMLDTD1 as the only
"data" document.  The only change between outputting this directly out
verss transforming it via XSLT is a PI to cocoon:

<?cocoon-process type="xslt"?>

So you could easily write Java to accept a request (or determine the
source of the request) and make a decision as to whether to instruct
Cocoon to transform your XML or to output it directly.  That's what
you're asking, correct?

> (2) Is there anything inherently bad in revealing the XSLT code (aside
> from the fact that you expended the effort and they can just copy it for
> other uses?)

Depends on the data involved.  Typically, revealing XSLT is much safer
than revealing XML data, so probably you are OK.

> (3) My real concern is over a dynamically generated XMLDTD1 document. I
> am not averse to showing the document as it is, before the XSLT is
> applied. How can I let them call XMLDTD1 without being transformed by
> the XSL (removing the browser autodetection to apply the XSL is out of
> the question) ?.

See #1.  Based on the request headers, or maybe where the request comes
from, or possibly a username/password sent in through a form... lots of
ways ;-)  Happily, Cocoon can do what you say, though.

-Brett

> 
> Ted

Mime
View raw message