cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From (Stephen R. Savitzky)
Subject Re: Easy to maintain Web applications?
Date Fri, 17 Dec 1999 17:19:53 GMT
Donald Ball <> writes:

> I hope I'm not taking this idea out of context, but I just had to chime in
> here. What do you gain here by using your own special flow control tags
> rather than XSLT flow control tags?

It's not entirely clear we gain very much, except that I'm not sure that the
XSLT flow control tags are a complete set, and the PIA tags appear to be
more easily extended and composed, and possibly more readable (* see below).
The main thing is that we started work on the PIA long before XSLT, and even
before the XML spec was released.  It basically comes out of the programming
language tradition, not the stylesheet tradition, so the overall flavor is
very different. 

Probably the biggest difference is that nothing in the PIA allows the
definition of a element to be expanded from accessing any part of the
document outside that element.  In other words, we don't allow any reference
to nodes by ID, or any reference to the root node unless there's a
definition for it (and there usually isn't).  This means that you never have
to have a complete parse tree for the document: anything undefined just
streams through.  (**)

The net result is that the PIA's document processor is, at least
potentially, very efficient and very easy to port to other implementation

(*)For example, compare:

  <xsl:if test="expression">template</xsl:if>


  <pia:if> expression 
	   <pia:then> expression </pia:then>
	   <pia:else> expression </pia:else>

In the PIA, an expression consists of any arbitrary XML.  If the user
defines a new active tag, they can use it in any expression.  XSL, in
contrast, has two kinds of "expressions", string expressions and
templates, with totally different syntax and semantics.  

Also, I didn't notice any looping construct in XSLT, though one may very
well have been added in Cocoon: in the PIA we have


(optional attributes omitted for clarity).  And so on.  There's a complete
set of numeric, logical, and string operations, and the user can define new
ones (including new control structures). 

(**) It's not entirely accurate to say that we can't refer to a node by ID,
because we have include:

  <pia:extract><pia:from><pia:include src="&DOC:path;"/></pia:from>

Stephen R. Savitzky  <>  <>
Platform for Information Applications:      <>
Chief Software Scientist, Ricoh Silicon Valley, Inc. Calif. Research Center
 voice: 650.496.5710  front desk: 650.496.5700  fax: 650.854.8740 
  home: <> URL:

View raw message