This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: [xml-dev] [Ann - Zvon] Templatotron
- From: Miloslav Nic <nicmila at systinet dot com>
- To: james anderson <james dot anderson at setf dot de>
- Cc: <xsl-list at lists dot mulberrytech dot com>
- Date: Mon, 11 Feb 2002 15:16:36 +0100 (CET)
- Subject: [xsl] Re: [xml-dev] [Ann - Zvon] Templatotron
- Reply-to: xsl-list at lists dot mulberrytech dot com
On Mon, 11 Feb 2002, james anderson wrote:
I have tried to make Templatotron as fast to type as possible for common
cases.
You will very seldomly need to set up a namespace
manually as the namespace is in most cases reasonably inherited.
To keep things simple for 90+% of usercases I had to make namespace
handling a bit more difficult for those remaining ones.
But then if you need a lot of power it is better to go for full XSLT,
the user scenarios I had in mind were like this:
you have an XML document with numbers you would like to process. You will
write a MathML template for an equation and then select relevant nodes
with an XPath. It presumes a rather simple template and you will save a lot of
typing if you are using Templatotron and not directly XSLT. And you can
think all the time about the equation, not about handling of XSLT
constructs.
>
> So far as i understand TAL it is used to analogous ends as are proposed
> for Templatotron. Analogous, rather than identical, in that input
> objects are data instances rather than documents.
>
> My concern is with the expressiveness rather than the implementation.
>
> To be more direct, the use of the distinguished namespace for element
> identifiers in order to trigger transformations introduces the need for
> additional operators to specify target namespaces. TAL, on the other
> hand, triggers on attributes. Which leaves the element identifer's
> namespace unencumbered and permits the "same" transformation to be
> expressed with fewer terms.
>
> I would expect that one could do the same with XSLT and was curious why
> one didn't.
>
> ...
>
> Miloslav Nic wrote:
> >
> > On Mon, 11 Feb 2002, james anderson wrote:
> >
> > I have not been aware of TAL till this moment.
> >
> > ...
> >
> > I guess that as an advantage can be considered the fact that you can
> > compile a Templatotron template with any XSLT processor and you can then
> > use the generated stylesheet with any XSLT enabled program including
> > browsers.
> >
> > And of course, I consider Templatotron very natural and simple to learn
> > and after scanning TAL spec I am still not too sure how TAL is to
> > be used and so I can argue that TAL is rather over-complex. :))
> >
> >
> > >
> > > This looks similar to TAL in the the zope page template system.
> > > One difference is the approach to namespaces.
> > > In the TAL case, a transformation is triggered simply by the presence of
> > > an attribute from the distinguished space. In the Templatotron case,
> > > it's the presence of such an element identifier.
> > >
> > > What was the thinking behind this decision? From reading the tutorial,
> > > it was not clear that this latter mechanism affords any advantage to
> > > counterbalance the added complexity.
> > >
> > > Miloslav Nic wrote:
> > > >
> > > > Templatotron is a simple language for template based XML processing. It
> > > > can be also thought of as a language designed to save some writing in
> > > > XSLT stylesheets and for keeping your attention focused on the XML syntax
> > > > not on the XSLT one. I do not personally mind the rather verbose XSLT
> > > > syntax and so in my eyes the second point is much more important but there
> > > > are others who may appreciate Templatotron terseness.
> > > >
> > > > ....
> > >
> > > -----------------------------------------------------------------
> > > The xml-dev list is sponsored by XML.org <http://www.xml.org>, an
> > > initiative of OASIS <http://www.oasis-open.org>
> > >
> > > The list archives are at http://lists.xml.org/archives/xml-dev/
> > >
> > > To subscribe or unsubscribe from this list use the subscription
> > > manager: <http://lists.xml.org/ob/adm.pl>
> > >
> >
> > --
> > ******************************************
> > <firstName> Miloslav </firstName>
> > <surname> Nic </surname>
> >
> > <mail> nicmila@systinet.com </mail>
> > <support> http://www.zvon.org </support>
>
--
******************************************
<firstName> Miloslav </firstName>
<surname> Nic </surname>
<mail> nicmila@systinet.com </mail>
<support> http://www.zvon.org </support>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list