=?ISO-8859-1?Q?C=E9dric_Damioli?= <[EMAIL PROTECTED]> writes:

   Of course you don't have to put an entry for each new doc : you simply 
   need the most common C2 pipeline:

   <map:match pattern="**.xml">
     <map:generate src="{1}.xml"/>
     <map:generate src="stylesheet.xsl"/>
     <map:serialize/>
   </map:match>

   This pipeline will process all the .xml files on your server. Does it 
   match your needs?

This assumes that all documents are processable using the same
stylesheet, which is not the case: 

1. Documents of different types often require different stylesheets
   because that is their nature: they describe different things, and
   styling is a convenient way of communicating this to a reader.

2. Documents of different types may reside in the same directory, and
   their filenames cannot be used to identify the document type (nor
   should they be, they're already abused to carry way too much 
   information :-). 

3. The document type is identified in the Document Type Declaration
   in each file. This is what it's for.

4. Different document types can have a root element type name which is
   the same (cf. ISO 12083 <book> vs. DocBook's <book>). 

Am I right in assuming that Cocoon-2 is based on the premise that 
all distinction between document files can be done only on the basis
of directory/file names (and REs matching them)?

The DocType Declaration is the only authoritative statement of the
document type. That is why is exists. If the PI has (rightly) been
retired as Cocoon's flag mechanism, something needs to be introduced
to replace it.

I realise this borders on heresy for some people, because it smacks of
using DTDs, which are anathema to many.  But I'm afraid it's the
reality of publishing: not all documents are the same, and directory
and file names are not always [ab]usable as discriminators.

In another project, the opposite is true: documents are submitted for
inclusion in a huge range of document types (read: DTDs) but they
are required to look the same when viewed. Hence one stylesheet per
DTD, implementing lots of ways of getting a consistent look.

Maybe Cocoon can't be used for this any more, in which case I
apologise for wasting your time.

///Peter


---------------------------------------------------------------------
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: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>

Reply via email to