-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Thursday 13 June 2002 6:20 am, Rob Nagler wrote:
> Matt Sergeant writes:
> > > This assumes you need XML in the first place.
> >
> > No, it does not. The rest of my post spoke about XML as a
> > data format and set of tools, not as a syntax. Please stop
> > thinking about XML as syntax!!
>
> If my entire system is written in Perl, why do I need XML as a data
> format?

Need is *not* what I said. But anyway, I already said: because of the tools.

Perl has nothing that even comes close to SAX as a clean way of doing the 
"unix"-like thing of having small tools to do just one job when it comes to 
data munging.

> Perl's data structures are richer and have much more support
> in Perl than XML has in any language.  Perl has been around much
> longer and is full-fledged programming language.  It has better
> tools.  It's got a larger community.

We disagree on this.

> > You seem to speak as someone who has never tried by the sounds of
> > things. This is one of the things AxKit's XSP taglibs are designed
> > to provide for.
>
> I've never used XSP.  I have used XSLT, tried to use XSD, and am
> currently mired in DocBook/XML.  One of my sites generates XML for its
> data export format.
>
> Let's take an XSP example from axkit.org:
>
>     <xsp:structure>
>           <xsp:include>Time::Object</xsp:include>
>     </xsp:structure>
>
>     <xsp:logic><![CDATA[
>     sub mytime {
>           my ($time) = @_;
>           $time ||= time;
>           return Time::Object->new($time);
>     }
>     ]]></xsp:logic>
>
> Why is the above better than below?  (I cleaned up the perl :-)
>
>     use Time::Object;
>     sub mytime {
>           my ($time) = @_;
>           return Time::Object->new($time || time);
>     }
>
> Or, why can't I just call Time::Object->new where I need it?

Erk. I knew the docs on AxKit.org were going to bite me in the ass one day. 
This is a really *bad* example of XSP usage. It's not separating content from 
presentation. Nowadays everything I do uses taglibs, which makes pages look 
like:

  <wiki xmlns:wiki="http://axkit.org/NS/xsp/wiki/1";>
    <wiki:login/>
    <wiki:display-page/>
  </wiki>

(yes, I'm writing an axkit wiki in case anyone's interested)

Anyway, that's off topic, because the point was you were trying to argue 
(IIRC) why would you bother hand generating XML from your data just to get 
access to XML tools. But XSP's two taglib modules (look at the docs on 
search.cpan.org, rather than on axkit.org) do that conversion automatically 
for you.

- -- 
<:->get a SMart net</:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE9CErhVBc71ct6OywRAn67AJ9E9o+MAnvkbXutEycFk+y7LAEVQwCfeUuI
95rN/7rb51T9wLJgY3EamL0=
=c8HN
-----END PGP SIGNATURE-----

Reply via email to