Return-Path: Delivered-To: apmail-cocoon-dev-archive@www.apache.org Received: (qmail 88608 invoked from network); 10 Dec 2004 13:24:47 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 10 Dec 2004 13:24:47 -0000 Received: (qmail 78514 invoked by uid 500); 10 Dec 2004 13:24:38 -0000 Delivered-To: apmail-cocoon-dev-archive@cocoon.apache.org Received: (qmail 78415 invoked by uid 500); 10 Dec 2004 13:24:37 -0000 Mailing-List: contact dev-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: dev@cocoon.apache.org Delivered-To: mailing list dev@cocoon.apache.org Received: (qmail 78397 invoked by uid 99); 10 Dec 2004 13:24:36 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FORGED_RCVD_HELO X-Spam-Check-By: apache.org Received-SPF: neutral (hermes.apache.org: local policy) Received: from 66.111.0.243.nyinternet.net (HELO confixx.bestiole.ch) (66.111.0.243) by apache.org (qpsmtpd/0.28) with ESMTP; Fri, 10 Dec 2004 05:24:34 -0800 Received: from [192.168.1.36] (lsn-boi-catv-c126-p138.vtx.ch [212.147.126.138]) by confixx.bestiole.ch (8.11.6/8.11.6) with ESMTP id iBADOSH20786 for ; Fri, 10 Dec 2004 14:24:29 +0100 Mime-Version: 1.0 (Apple Message framework v619) In-Reply-To: <41B99900.4040807@bitflux.ch> References: <210CC1D1-4A96-11D9-8BD5-000A95AF004E@apache.org> <41B99900.4040807@bitflux.ch> Content-Type: multipart/signed; micalg=sha1; boundary=Apple-Mail-14--176183080; protocol="application/pkcs7-signature" Message-Id: From: Bertrand Delacretaz Subject: Re: Templating: experiments with Conal's html-to-xslt transform Date: Fri, 10 Dec 2004 14:24:28 +0100 To: dev@cocoon.apache.org X-Mailer: Apple Mail (2.619) X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N --Apple-Mail-14--176183080 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Hi Christian, > ...As I mentioned before (to one of stefano's posts), we did something > similar, but with the TAL syntax. We convert that to XSLT with XSLT > and then do the actual transformation with XSLT. It's the same idea as > yours. I like the approach, even though it's not complete yet (our > implementation) and we could certainly add some of your ideas... Sorry that I overlooked this, I was busy at the time and forgot about it (and we didn't meet at the non-happening Bern dinner, too bad - our day will come ;-). > ...http://svn.bitflux.ch/repos/public/bxcmsdemo/themes/bxcms/ > template.tal. Trying to jump into the head of the "average HTML template designer", to me this looks more complicated to understand than the example at http://wiki.apache.org/cocoon/HtmlToXsltExperiments. But you're setting attributes and I'm not, might account for some of the differences in (perceived) complexity. > ...I don't say, our approach is better than yours, I didn't build an > opinion on that. But maybe we could join efforts in it. As it's a pure > XSLT implementation, the programming language behind doesn't really > matter... Right, this is purely an XSLT thing. And joining efforts is good, even if it's only stealing ideas back and forth. I don't think we (Cocoon and bitflux) necessarily need to agree on everything, the resutling XSLT code won't be very big anyway. After replying to Daniel, I think having a "declarative rules" section or not in the template is a key point: IMHO the "copy some elements with minor changes" scenario is very common, the bindings.xml use-case in my example shows this. How would you handle this with your syntax? For example, transforming an XHTML input document by adding class attributes to and

elements, without knowing where they appear in the input? In my example you just need to add a "declarative rules" section like this, assuming you have an apply-templates in the main section:

Note that we can add text here to explain what's happening. Here we add a class attribute to p's

Add a border to tables:
-Bertrand --Apple-Mail-14--176183080 Content-Transfer-Encoding: base64 Content-Type: application/pkcs7-signature; name=smime.p7s Content-Disposition: attachment; filename=smime.p7s MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIIGRTCCAv4w ggJnoAMCAQICAw0p3DANBgkqhkiG9w0BAQQFADBiMQswCQYDVQQGEwJaQTElMCMGA1UEChMcVGhh d3RlIENvbnN1bHRpbmcgKFB0eSkgTHRkLjEsMCoGA1UEAxMjVGhhd3RlIFBlcnNvbmFsIEZyZWVt YWlsIElzc3Vp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