cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Berin Loritsch <blorit...@apache.org>
Subject Re: Serving static XML files a la Cocoon-1
Date Thu, 25 Apr 2002 16:07:52 GMT
Peter Flynn wrote:
>>You don't understand the Cocoon2 concepts at all.
> 
> 
> I think you are deeply mistaken :-)
> 
> 
>>It is nonsense to serve XML files with "their" XSL files : 
> 
> 
> This is rubbish. Leave aside non-valid XML, as I don't use it.
> All valid XML documents adhere to a DTD by definition (omit
> Schemas, they're not relevant here). Each DTD has a stylesheet
> to render documents of its class. I require to serve the XML
> documents processed with the relevant XSL stylesheet into HTML.
> Each XSL stylesheet "belongs" to a DTD: that is, it is written
> to render documents written to that DTD.

Key distinction:

DTDs are used to *VALIDATE*, not render.

>>the principle 
>>is to separe data and presentation, ie XML source and XSL.
> 
> 
> Absolutely correct. This is what I do. I have a large number of XML
> files and a very small number of XSL files (one stylesheet per
> document type, modulo development).
> 
> Each document type (in effect, DTD) has one stylesheet at any given
> point in time, so that all documents written to that DTD are served
> in a uniform format.
> 
> Over time, a new format may be developed, at which stage it will be
> useful to be able to edit the sitemap to make all XML documents of a
> given type to use a new stylesheet. But this is a once-every-few-years
> task, not something I change every five minutes.

True, but it is not uncomon to have a working stylsheet in applications,
and before release the web monkeys are let loose to make it look nice.
Of course both these developments can be happening simultaneously.  THe
doc writer should not care how the info is presented, that isn't their
concern.



>>So you have to write a pipeline (or to copy/paste one from an existing 
>>sitemap) to generate HTML stuff from XML by transforming it through XSL.
>>
>>The sample sitemap bundled with Cocoon offers these 'defaults' already.
> 
> 
> If that is so, why does it not transform my sample XML document with
> its accompanying XSL stylesheet?

Are you volunteering to write something that reacts to PIs?

It's not really a trivial task, and considering the amount of work
involved in it, for something we really don't want to encourage,
its not a likely thing to happen soon.

Going back to your "associated" XSL document, and distributing the files
w/o a server: you can still do that with your PIs.  A browser that knows
how to treat the PIs will do so correctly.  However, for serving up to
older browsers, you should use the preferred method.  Your Sitemap won't
change much.  You stated something like every few years.  When you
change your site, you only need to update the sitemap to point to the
new stylesheet--even if you have hundreds of documents by then.


-- 

"They that give up essential liberty to obtain a little temporary safety
  deserve neither liberty nor safety."
                 - Benjamin Franklin


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


Mime
View raw message