Gerald,
I have been thinking about some XML style extensions for
Apache::ASP, and know that you are looking at the same thing
with Embperl, and was hoping that we could sync up on the
APi, so there might be a common mindset for a developer when
using our extensions, even if the underlying implementation
were different.
I've been looking at the XML / Cocoon project, and see their
next generation technology being XSP, which ends up being
lots of <xsp:.../> tags being processed. Their style sheet
libraries they come up with are really quite horrific, but
I do like the flexible tab markup possible in their system.
I was thinking about turning these XML tags into perl style
functions internally, or possibly includes, such that a tag like:
<my:table bgcolor=black> $table_data </my:table>
might actually hook into a sub routine called:
sub my::table {
my($table_data, $args) = @_;
"<table cellpadding=20 bgcolor=$args->{bgcolor}>$table_data</table>";
} ## the return value here might be printed
or an include called my_table.inc:
<% my($data, $args) = @_; %>
<table cellpadding=20 bgcolor=<%=$args->{bgcolor}%> >
<%=$data%>
</table>
Looking at the XSP project, if someone wanted to render XSP
using Apache::ASP or Embperl, we could simple translate the
<xsp:content|logic|expr> stuff into our relevant place holders
like <% %>, [+ +], etc, and let people defined their own tags
like in the XSP example.
<page title="Time of Day">
<p>
To the best of my knowledge, it's now
<!-- Substitute time of day here -->
<example:time-of-day format="yy/MM/dd hh:mm:ss aa"/>
</p>
</page>
where the <example/> tag is defined by
<xsl:template match="example:time-of-day">
<xsp:expr>
formatDate(new Date(), "<xsl:value-of select="@format"/>")
</xsp:expr>
</xsl:template>
but instead of the latter XML style example definition,
we might give our developers something more native, I'm think perl
subroutines or ASP includes, but you might want some kind
of Embperl hooks. At the end of it all, if we both support
the same kind of markup and thinking behind it, I think this
will be a win for the embedded perl solutions.
So let me know what you think. Thanks.
-- Joshua
_________________________________________________________________
Joshua Chamas Chamas Enterprises Inc.
NodeWorks >> free web link monitoring Huntington Beach, CA USA
http://www.nodeworks.com 1-714-625-4051