<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Cross-breeding XSLT and ZPT</title>
	<atom:link href="http://decafbad.com/blog/2004/12/02/crossbreedingxsltzpt/feed" rel="self" type="application/rss+xml" />
	<link>http://decafbad.com/blog/2004/12/02/crossbreedingxsltzpt</link>
	<description>It's all spinning wheels and self-doubt until the first pot of coffee.</description>
	<lastBuildDate>Fri, 19 Mar 2010 00:06:39 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0-alpha</generator>
	<item>
		<title>By: Ian Bicking</title>
		<link>http://decafbad.com/blog/2004/12/02/crossbreedingxsltzpt/comment-page-1#comment-1399</link>
		<dc:creator>Ian Bicking</dc:creator>
		<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.decafbad.com/blog/?p=570#comment-1399</guid>
		<description>&lt;p&gt;I&#039;ve been meaning to write about this on my blog, as I&#039;ve done something similar.&lt;/p&gt;

&lt;p&gt;Instead of using XSLT, I&#039;ve used ZPT for the transformations.  It was an application where the user created a document in a WYSIWYG editor, then we wanted to pull information out of the content -- like a table of contents, or a title.&lt;/p&gt;

&lt;p&gt;To do this I parsed the content into a DOM, then put some objects in the ZPT namespace that manipulated it.  For instance, the ToC object took a tag name (through getitem) and returned a list of the content and id of those tags (it created ids if necessary, modifying the content).  Then you could easily create a ToC by looking through and creating anchor tags from, say, all the  tags in the document.  It should be easy to expand with other transformations (all coded in Python, of course).  The actual code was only like 20 lines of Python, maybe less, and easy to understand from both sides (ZPT and Python).&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I&#8217;ve been meaning to write about this on my blog, as I&#8217;ve done something similar.</p>
<p>Instead of using XSLT, I&#8217;ve used ZPT for the transformations.  It was an application where the user created a document in a WYSIWYG editor, then we wanted to pull information out of the content &#8212; like a table of contents, or a title.</p>
<p>To do this I parsed the content into a DOM, then put some objects in the ZPT namespace that manipulated it.  For instance, the ToC object took a tag name (through getitem) and returned a list of the content and id of those tags (it created ids if necessary, modifying the content).  Then you could easily create a ToC by looking through and creating anchor tags from, say, all the  tags in the document.  It should be easy to expand with other transformations (all coded in Python, of course).  The actual code was only like 20 lines of Python, maybe less, and easy to understand from both sides (ZPT and Python).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Petri Savolainen</title>
		<link>http://decafbad.com/blog/2004/12/02/crossbreedingxsltzpt/comment-page-1#comment-1400</link>
		<dc:creator>Petri Savolainen</dc:creator>
		<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.decafbad.com/blog/?p=570#comment-1400</guid>
		<description>&lt;p&gt;See http://zope.org/Members/DaddyGravity/PT_XPath&lt;/p&gt;

&lt;p&gt;It would be great to have that in SimpleTAL, too.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>See <a href="http://zope.org/Members/DaddyGravity/PT_XPath" rel="nofollow">http://zope.org/Members/DaddyGravity/PT_XPath</a></p>
<p>It would be great to have that in SimpleTAL, too.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ian Bicking</title>
		<link>http://decafbad.com/blog/2004/12/02/crossbreedingxsltzpt/comment-page-1#comment-1401</link>
		<dc:creator>Ian Bicking</dc:creator>
		<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.decafbad.com/blog/?p=570#comment-1401</guid>
		<description>&lt;p&gt;Another thing you might want to look at: in the last few days there&#039;s been discussion on the ZPT mailing list about an extension to stylesheets (TERSE) for ZPT that introduces transformations.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Another thing you might want to look at: in the last few days there&#8217;s been discussion on the ZPT mailing list about an extension to stylesheets (TERSE) for ZPT that introduces transformations.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bertrand Delacretaz</title>
		<link>http://decafbad.com/blog/2004/12/02/crossbreedingxsltzpt/comment-page-1#comment-1402</link>
		<dc:creator>Bertrand Delacretaz</dc:creator>
		<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.decafbad.com/blog/?p=570#comment-1402</guid>
		<description>&lt;p&gt;FYI, people from the Apache Cocoon and BXE projects are working on similar stuff, in the opposite direction: we&#039;re taking TAL-like templates and converting them to XSLT, adding simple &quot;match&quot; templates for declarative rules. It&#039;s only prototypes and experiments for now, but the results look promising.&lt;/p&gt;

&lt;p&gt;More info at
http://wiki.apache.org/cocoon/HtmlToXsltExperiments
and
http://blog.bitflux.ch/archive/further-improvements-on-xsl-tal.html&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>FYI, people from the Apache Cocoon and BXE projects are working on similar stuff, in the opposite direction: we&#8217;re taking TAL-like templates and converting them to XSLT, adding simple &#8220;match&#8221; templates for declarative rules. It&#8217;s only prototypes and experiments for now, but the results look promising.</p>
<p>More info at<br />
<a href="http://wiki.apache.org/cocoon/HtmlToXsltExperiments" rel="nofollow">http://wiki.apache.org/cocoon/HtmlToXsltExperiments</a><br />
and<br />
<a href="http://blog.bitflux.ch/archive/further-improvements-on-xsl-tal.html" rel="nofollow">http://blog.bitflux.ch/archive/further-improvements-on-xsl-tal.html</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Manuzhai</title>
		<link>http://decafbad.com/blog/2004/12/02/crossbreedingxsltzpt/comment-page-1#comment-1403</link>
		<dc:creator>Manuzhai</dc:creator>
		<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.decafbad.com/blog/?p=570#comment-1403</guid>
		<description>&lt;p&gt;I like XSLT a lot, myself, and I have advocated it in the past on my weblog, but it just doesn&#039;t seem to be very wide-spread. Which is a pity, I think the world would be much easier if more people used this &lt;em&gt;standard&lt;/em&gt; way of templating.&lt;/p&gt;

&lt;p&gt;One of the bigger problems with it seems to be the verbosity, so I&#039;ve been thinking of a more compact syntax, kind of like RELAX NG has the .rnc compact stuff. I don&#039;t know if it&#039;s very feasible, but it seems like that would be not very hard; just have some compact syntax which maps onto a real XSLT-sheet (it could be &quot;compiled&quot; and cached, if need be).&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I like XSLT a lot, myself, and I have advocated it in the past on my weblog, but it just doesn&#8217;t seem to be very wide-spread. Which is a pity, I think the world would be much easier if more people used this <em>standard</em> way of templating.</p>
<p>One of the bigger problems with it seems to be the verbosity, so I&#8217;ve been thinking of a more compact syntax, kind of like RELAX NG has the .rnc compact stuff. I don&#8217;t know if it&#8217;s very feasible, but it seems like that would be not very hard; just have some compact syntax which maps onto a real XSLT-sheet (it could be &#8220;compiled&#8221; and cached, if need be).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Colin Stewart</title>
		<link>http://decafbad.com/blog/2004/12/02/crossbreedingxsltzpt/comment-page-1#comment-1404</link>
		<dc:creator>Colin Stewart</dc:creator>
		<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.decafbad.com/blog/?p=570#comment-1404</guid>
		<description>&lt;p&gt;Integrating an XPATH implementation into SimpleTAL shouldn&#039;t be too hard as the TALES and TAL implementations share a fairly simple interface.  There are 6 methods you&#039;d have to provide to the simpleTAL module and that&#039;s about it.&lt;/p&gt;

&lt;p&gt;I don&#039;t know if XPATH is the right approach though - how would things like tal:define work if the paths were pure XPATH instead of TALES?  Being able to mix XPATH and TALES would work better I think.&lt;/p&gt;

&lt;p&gt;A more promising approach would be to integrate ElementTree so that the &#039;find*&#039; methods were usable from within TALES.  Making it so that &#039;/mydoc/root/find/.//searchElement&#039; works would be fairly easy, but getting &#039;/mydoc/root/find/.//searchElement/attrib/firstAtt&#039; to work would require more co-operation between ElemenTree and SimpleTAL.&lt;/p&gt;

&lt;p&gt;I&#039;ll have a think about this though as it sounds like a promising approach.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Integrating an XPATH implementation into SimpleTAL shouldn&#8217;t be too hard as the TALES and TAL implementations share a fairly simple interface.  There are 6 methods you&#8217;d have to provide to the simpleTAL module and that&#8217;s about it.</p>
<p>I don&#8217;t know if XPATH is the right approach though &#8211; how would things like tal:define work if the paths were pure XPATH instead of TALES?  Being able to mix XPATH and TALES would work better I think.</p>
<p>A more promising approach would be to integrate ElementTree so that the &#8216;find*&#8217; methods were usable from within TALES.  Making it so that &#8216;/mydoc/root/find/.//searchElement&#8217; works would be fairly easy, but getting &#8216;/mydoc/root/find/.//searchElement/attrib/firstAtt&#8217; to work would require more co-operation between ElemenTree and SimpleTAL.</p>
<p>I&#8217;ll have a think about this though as it sounds like a promising approach.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul Everitt</title>
		<link>http://decafbad.com/blog/2004/12/02/crossbreedingxsltzpt/comment-page-1#comment-1405</link>
		<dc:creator>Paul Everitt</dc:creator>
		<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.decafbad.com/blog/?p=570#comment-1405</guid>
		<description>&lt;p&gt;Chapter 11 of Jeni Tennison&#039;s &quot;XSLT and XPath On The Edge&quot; book has a section called &quot;Using Page Templates&quot;.  It includes an example of using substitution points.&lt;/p&gt;

&lt;p&gt;Like some of the others in this thread, playing with doing merges using DOM IDs and other patterns.  This lets you write &quot;themes&quot; that are simpler than even ZPT, as they contain no non-XHTML namespace elements.&lt;/p&gt;

&lt;p&gt;Thanks for the article, which also seems to have brought out some interesting comments and URLs!&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Chapter 11 of Jeni Tennison&#8217;s &#8220;XSLT and XPath On The Edge&#8221; book has a section called &#8220;Using Page Templates&#8221;.  It includes an example of using substitution points.</p>
<p>Like some of the others in this thread, playing with doing merges using DOM IDs and other patterns.  This lets you write &#8220;themes&#8221; that are simpler than even ZPT, as they contain no non-XHTML namespace elements.</p>
<p>Thanks for the article, which also seems to have brought out some interesting comments and URLs!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bill Seitz</title>
		<link>http://decafbad.com/blog/2004/12/02/crossbreedingxsltzpt/comment-page-1#comment-1406</link>
		<dc:creator>Bill Seitz</dc:creator>
		<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.decafbad.com/blog/?p=570#comment-1406</guid>
		<description>&lt;p&gt;Don&#039;t forget you can run Python within IIS/ASP!&lt;/p&gt;

&lt;p&gt;http://webseitz.fluxent.com/articles/PythonViaIis&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Don&#8217;t forget you can run Python within IIS/ASP!</p>
<p><a href="http://webseitz.fluxent.com/articles/PythonViaIis" rel="nofollow">http://webseitz.fluxent.com/articles/PythonViaIis</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Colin Stewart</title>
		<link>http://decafbad.com/blog/2004/12/02/crossbreedingxsltzpt/comment-page-1#comment-1407</link>
		<dc:creator>Colin Stewart</dc:creator>
		<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.decafbad.com/blog/?p=570#comment-1407</guid>
		<description>&lt;p&gt;I&#039;ve put together an experimental build of SimpleTAL that integrates ElementTree to provide some of the XPATH syntax.  It&#039;s just an experiment, but see what you think.&lt;/p&gt;

&lt;p&gt;(More detail here: http://www.owlfish.com/weblog/2004/12/15122004.html#20:59:59)&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I&#8217;ve put together an experimental build of SimpleTAL that integrates ElementTree to provide some of the XPATH syntax.  It&#8217;s just an experiment, but see what you think.</p>
<p>(More detail here: <a href="http://www.owlfish.com/weblog/2004/12/15122004.html#20:59:59)" rel="nofollow">http://www.owlfish.com/weblog/2004/12/15122004.html#20:59:59)</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ryan Tomayko</title>
		<link>http://decafbad.com/blog/2004/12/02/crossbreedingxsltzpt/comment-page-1#comment-1408</link>
		<dc:creator>Ryan Tomayko</dc:creator>
		<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.decafbad.com/blog/?p=570#comment-1408</guid>
		<description>&lt;p&gt;&lt;strong&gt;Why isn&#039;t there a simple XSLT?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This is pretty much the exact thing going through my head when I decided to
start in on Kid. The first half, the TAL/ZPT feel, is already quite visible
in the [Kid Language Reference][lang]. The second part, constructs for
transformation, is what ha...&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p><strong>Why isn&#8217;t there a simple XSLT?</strong></p>
<p>This is pretty much the exact thing going through my head when I decided to<br />
start in on Kid. The first half, the TAL/ZPT feel, is already quite visible<br />
in the [Kid Language Reference][lang]. The second part, constructs for<br />
transformation, is what ha&#8230;</p>
]]></content:encoded>
	</item>
</channel>
</rss>
