Ian Atkin wrote: > Steven Noels wrote:
>> One of the goals of Forrest is serious DTD change management. While >> other projects consider XML grammars a bare necessity, we believe DTDs >> are part of our deliverables. We actually enjoy working on these pesky >> things - can you imagine? >> >> So yes, we believe people should refer to Forrest for 'reference' DTDs >> - and we try to keep our DTDs as lean & mean as possible, while adding >> relevant new elements/features upon request & evaluation. > > > > so part of forrest is to ship with a tightly constrained markup, and to > encourage user projects to use it - ok > > question still remains that if someone doesn't like/know this markup can > they still use forrest? looks like answer is no I have been thinking about this since Cocoon1 time... the SoC enforced using Cocoon2 meant that you didn't directly referred from a document to its accompagnying stylesheet, but used a sitemap instead. Now this is very good practice etc... but this also means the grammar against which your documents validate, is only used during document creation, and cannot be used for confugation during generation/rendition. Imagine we want to support several document types (grammars, DTDs, XSDs, you name it) with Forrest. A practical example of this is the work Diana did once during some transition test from doc-v10 to doc-v11. Another example might be supporting DocBook with Forrest. You have a scenario where the routing of documents across the Cocoon pipeline need to be done based on the type/class of the document, and cannot be inferred from the environment (request/context/etc) We would have a situation like this: <map:match pattern="*.html"> <map:generate src="*.xml"> <map:match public-id="-//APACHE//DTD FAQ V1.1//EN" type="doctypematcher"> <map:transform src="faq2document.xsl"/> </map:match> <map:match public-id="-//OASIS//DTD DocBook V3.1//EN" type="doctypematcher"> <map:transform src="faq2document.xsl"/> </map:match> <map:call resource="skinit"> <map:parameter name="type" value="document2html"/> </map:call> </map:match> This brings us to the wonderful world of Martin Fowler's Two Step View Pattern (http://martinfowler.com/isa/htmlRenderer.html), setting the interface (logical page) of Forrest to an XML document that complies to the document-v11 dtd, but giving the authors a choice of authoring formats (doc-v11 being one of them, too). 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... What do you think of this approach? What do Cocooners think of it? </Steven> -- Steven Noels http://outerthought.org/ Outerthought - Open Source, Java & XML Competence Support Center [EMAIL PROTECTED] [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]