Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 2675 invoked from network); 10 Jan 2000 00:06:30 -0000 Received: from dfwns08.algx.net (216.99.225.37) by 63.211.145.10 with SMTP; 10 Jan 2000 00:06:30 -0000 Received: from algx.net ([216.99.228.88]) by dfwns08.algx.net (Post.Office MTA v3.5.2 release 221 ID# 0-56809U5000L5300S0V35) with ESMTP id net for ; Sun, 9 Jan 2000 18:05:13 -0600 Message-ID: <3879229E.A5EFB88E@algx.net> Date: Sun, 09 Jan 2000 18:06:54 -0600 From: Brett McLaughlin X-Mailer: Mozilla 4.7 [en] (WinNT; I) X-Accept-Language: en MIME-Version: 1.0 To: cocoon-dev@xml.apache.org Subject: Re: How to reveal original XML document before XSLT was applied? References: <38791F34.86A701B8@groupserve.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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: 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