Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

perl/XML development

by dda (Friar)
on Sep 05, 2002 at 07:54 UTC ( #195307=perlquestion: print w/replies, xml ) Need Help??

dda has asked for the wisdom of the Perl Monks concerning the following question:

Hello dear Monks,

I was asked to develop a standard multi-user application (entering/editing data, some reporting, etc). I was going to do it in "usual" way: CGI application using a template system (such as Text::Template, HTML::Template). But my client wanted it to be done with XML/XSLT. I have found a node about Perl Application Servers (78609), and I want to ask you: is there any news on the subject? Any other projects supporting XML/XSLT?

Or probably there is another approach, without Application Server? Say, does it make sense to prepare XML file, use it as a template, and then apply some transformation to it to convert it to HTML? Any advice is welcome.

--dda

Replies are listed 'Best First'.
Re: perl/XML development
by davorg (Chancellor) on Sep 05, 2002 at 07:59 UTC

    You might find the Perl XML FAQ to be useful for general questions about Perl and XML.

    For your specific application, I think you should take a look at AxKit.

    --
    <http://www.dave.org.uk>

    "The first rule of Perl club is you do not talk about Perl club."
    -- Chip Salzenberg

Re: perl/XML development
by ajt (Prior) on Sep 05, 2002 at 09:37 UTC

    dda

    "Say, does it make sense to prepare XML file, use it as a template, and then apply some transformation to it to convert it to HTML? Any advice is welcome."

    A lot depends on the scale of the project, but we achived quite a lot with a CGI/XSLT combination, like you suggest. I would not recommend this approach for larger projects, but Matts excellent AxKit looks very good.

    What we did was to use XML to communicate with a backend SAP system. The SAP system spoke in XML, so the CGI application used XML to speak with the SAP system. The applaction used the XML::LibXML module to manipulate input/output XML and then used XML::LibXSLT to convert XML to HTML.

    If you like XML/XSLT then this is a nice way of doing things, and the we used Perl to feed things into and extract things from the XML before we transform it.

    The application has been running now with multiple users for about 4 months, and on a 1Gz Linux box, it seems to perform quite well. We've not pushed it yet to find out how many simultaneous users it can deal with, but if we wanted a big system we'd have written it in mod_Perl, and probably used AxKit.

    Update: Minor corrections.


    --
    ajt
      Thanks for your reply. I looked at cocoon's .xsp files with <esql:..> tags, and now I'm thinking how to implement the same with perl. I.e. I'd like to be able to use some kind of logic (like <xsp:logic>) to fetch and manipulate the data in XML before applying style to it.

      I'm thinking about some mix of Text::Template module (I used it some time ago) and XML templates. May be I'm re-inventing the wheel? May be some sort of XML::Template module exists?

      Basically, I'd like it to be standalone. I do not want any specific environment, like modperl. Do I want too much? :)

      --dda

        You realise that AxKit supports XSP taglibs? Even if you don't want to use AxKit/mod_perl you might be able to steal some useful code from there.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://195307]
Approved by demerphq
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (2)
As of 2022-05-21 07:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (76 votes). Check out past polls.

    Notices?