[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: advocating XML

  • From: Matt Sergeant <matt@s...>
  • To: "Thomas B. Passin" <tpassin@h...>
  • Date: Wed, 14 Mar 2001 09:37:22 +0000 (GMT)

perl xml template
On Wed, 14 Mar 2001, Thomas B. Passin wrote:

> Paul T wrote -
>
> > Now if you map the A.xml into *regex*line*oriented* file, I bet
> > you be surprised how *trivial* the overall task becomes if doing
> > it in python or perl or any other scripting language that inherits
> > from UNIX.
> >
>  When I started working with xml files, I used scripts with REs, and I tried
> to keep my files line-oriented as well.  Of course, I used functions and
> methods to produce the output, usually html.  I tried to avoid stylesheets and
> parsers.  I thought I didn't need them and they were too complicated.
>
> After awhile, I noticed that it was getting harder and harder as my xml tasks
> became more complex.  I had to keep track of a lot of context, and the REs
> were harder to get working right.  I also noticed that that it was getting
> really hard to change the html output and make sure it was right.

While I mostly disagree with Paul's general sentiment, it's far too easy
here to say that XML+XSLT is the only system that supports template based
output generation. Perl has some excellent template tools such as
HTML::Template and Text::Template and the Template Toolkit which are
perfect for this kind of job.

Oh, plus if you're using CSV, you don't need regexps at all (Text::CSV in
Perl handles this just fine). But it's sure nice to have the capabilities
of a general purpose language at your disposal before doing any output.

-- 
<Matt/>

    /||    ** Founder and CTO  **  **   http://axkit.com/     **
   //||    **  AxKit.com Ltd   **  ** XML Application Serving **
  // ||    ** http://axkit.org **  ** XSLT, XPathScript, XSP  **
 // \\| // ** mod_perl news and resources: http://take23.org  **
     \\//
     //\\
    //  \\


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.