Re: The suitability of XSL

Liam Quin <[email protected]>
Newsgroups gmane.comp.lang.perl.xml
Message-ID <[email protected]>
On Mon, Dec 07, 2009 at 02:38:58PM -0800, Kip Hampton wrote:
> Broadly speaking, XSLT is best for transforming deeply nested 
> document-centric XML (docbook, XHTML) while Perlish, programmatic 
> solutions (SAX, Twig, XML::Simple, etc) are best for shallower 
> data-centric XML.

Don't forget handling XLM or almost-XML with Perl and regular
expressions -- it was a deliberate design goal of XML to make
that possible, and although we made the mistake of including
CDATA sections, which make it harder, I think we came close.

> Most of the heartache (and crappy XSL) I've seen over the years has come 
> from cases where people [...] try to write big rules 
> that transform large chunks of the document at once instead of writing 
> smaller template rules that use selective recursion.

Agreed here. For document conversion I prefer a pipeline approach,
with lots of little scripts each doing one thing (or a few things).
This also works well with "make".

Liam


-- 
Liam Quin, W3C XML Activity Lead, http://www.w3.org/People/Quin/
http://www.holoweb.net/~liam/ * http://www.fromoldbooks.org/
_______________________________________________
Perl-XML mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.