This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: general purpose tranformation language (Re: No side effects holycow. )
- To: xsl-list at mulberrytech dot com
- Subject: Re: general purpose tranformation language (Re: No side effects holycow. )
- From: Matt Sergeant <matt at sergeant dot org>
- Date: Tue, 25 Apr 2000 10:25:02 +0100 (BST)
- Reply-To: xsl-list at mulberrytech dot com
I'm going to snip an extremely long post and reply with this: Build your
own.
As an example I built XPathScript. It's 251 lines of code, and a third of
that is documentation. It implements a combination of ASP-like <% %>
brackets and XPath for node resolution. It's built in perl and so uses
perl as it's in-built language:
<%
foreach my $node (findnodes('/some/xpath/here')) {
print "<b>Found a node!</b><br>\n";
}
%>
It doesn't do nifty things like XSLT can do with apply-templates. I think
something like this would suffice:
$transforms->{'tag'}{pre} = "<h1>";
$transforms->{'tag'}{post} = "</h1>";
After all - most apply-templates stuff breaks down into what comes before
a tag and what comes after it. The rest can be done with the "Literal
Result Element" part. I think... :)
--
<Matt/>
Fastnet Software Ltd. High Performance Web Specialists
Providing mod_perl, XML, Sybase and Oracle solutions
Email for training and consultancy availability.
http://sergeant.org http://xml.sergeant.org
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list