> -----Original Message----- > From: Steven Noels [mailto:[EMAIL PROTECTED]]
> In terms of implementation, this could be a pipeline configuration > component, a Matcher of Selector. It would require to 'parse' the XML > document upto a level it can detect its grammar (for DTDs the doctype > statement, for Schemas the xsi:SchemaLocation attribute, etc), > sufficiently cached etc... NB it is possible to do something similar with an XSLT transformation. I produced a demo of how to select an XSLT transform based on a processing-instruction in the XML source (I know! This is horrible! But an xml-stylesheet processing instruction could effectively stand in for the DTD declaration which is not available once the document is parsed.) For details, see http://marc.theaimsgroup.com/?l=xml-cocoon-users&m=102003720732535&w=2 In terms of the mechanics, you need 2 pipelines: one to produce the stylesheet appropriate for transforming a given document (i.e. transforms the source document into a stylesheet suitable for transforming the source document), and the second pipeline actually applies the resulting stylesheet. Your "get-stylesheet.xsl" could detect the doctype by examining the name and ns of the root element of the document (instead of looking for processing-instructions as my demo did), and decide on the appropriate transformation that way. Cheers Con --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]