xslt ?

Discussion in 'Perl Misc' started by surf, Aug 23, 2006.

  1. surf

    surf Guest

    I had tried to work with XLST a few years ago. I got some simple stuff
    to work, then I started playing with perl XML parsers and the xml:twig
    module in perl. All of this stuff I really liked, so I forgot about
    working with xlst which to me didn't seem like the way to go,
    especially if it got very complex. I'm not sure why anyone would want
    to write a program of any sort in XML anyway ?

    However, now I realize I have to know what to say in an interview. A
    recruiter did a phone interview with me and asked me about xlst. I told
    him I thought it was rather weak compared to what perl modules can do,
    but if I had to do it, I've played with it and have a book on it. I
    perhaps have to figure out how to answer these kinds of questions, or
    ask myself do I really want to have to write XSLT anyway if they did
    hire me someplace that expects you to do it that way ?
    surf, Aug 23, 2006
    #1
    1. Advertising

  2. surf

    John Bokma Guest

    "surf" <> wrote:

    > However, now I realize I have to know what to say in an interview. A
    > recruiter did a phone interview with me and asked me about xlst. I told
    > him I thought it was rather weak compared to what perl modules can do,
    > but if I had to do it, I've played with it and have a book on it. I
    > perhaps have to figure out how to answer these kinds of questions, or
    > ask myself do I really want to have to write XSLT anyway if they did
    > hire me someplace that expects you to do it that way ?


    There is no simple answer, sometimes XSLT is better and sometimes Perl.
    Only when you learn both you are able to answer questions like when one is
    better compared to the other. I do recommend to learn XSLT.

    --
    John Experienced Perl programmer: http://castleamber.com/

    Perl help, tutorials, and examples: http://johnbokma.com/perl/
    John Bokma, Aug 23, 2006
    #2
    1. Advertising

  3. surf

    Matt Garrish Guest

    surf wrote:

    > I had tried to work with XLST a few years ago. I got some simple stuff
    > to work, then I started playing with perl XML parsers and the xml:twig
    > module in perl. All of this stuff I really liked, so I forgot about
    > working with xlst which to me didn't seem like the way to go,
    > especially if it got very complex. I'm not sure why anyone would want
    > to write a program of any sort in XML anyway ?
    >


    You're so behind the times. Everyone is using RXParse for their XML
    these days. Be sure and tell your recruiter.

    Matt
    Matt Garrish, Aug 23, 2006
    #3
  4. surf <> wrote:


    > I'm not sure why anyone would want
    > to write a program of any sort in XML anyway ?



    One Reason:

    XSLT is optimized for machines rather than for humans.



    Let's haul this back on-topic:

    Contrast that with Perl, which is optimized for humans at the
    expense of the machine (throwing cycles and memory at a problem).


    --
    Tad McClellan SGML consulting
    Perl programming
    Fort Worth, Texas
    Tad McClellan, Aug 24, 2006
    #4
  5. surf

    surf Guest

    Matt Garrish wrote:
    > surf wrote:
    >
    > > I had tried to work with XLST a few years ago. I got some simple stuff
    > > to work, then I started playing with perl XML parsers and the xml:twig
    > > module in perl. All of this stuff I really liked, so I forgot about
    > > working with xlst which to me didn't seem like the way to go,
    > > especially if it got very complex. I'm not sure why anyone would want
    > > to write a program of any sort in XML anyway ?
    > >

    >
    > You're so behind the times. Everyone is using RXParse for their XML
    > these days. Be sure and tell your recruiter.
    >
    > Matt


    Under jobs on boston craigslist I searched for xslt and got 222 hits,
    I got none for RXParse. That doesn't mean it isn't great, just that no
    one in boston is looking to hire anyone based on that unless it's a
    tool that is part of some other application.
    surf, Aug 25, 2006
    #5
  6. surf

    surf Guest

    Tad McClellan wrote:
    > surf <> wrote:
    >
    >
    > > I'm not sure why anyone would want
    > > to write a program of any sort in XML anyway ?

    >
    >
    > One Reason:
    >
    > XSLT is optimized for machines rather than for humans.
    >
    >
    >
    > Let's haul this back on-topic:
    >
    > Contrast that with Perl, which is optimized for humans at the
    > expense of the machine (throwing cycles and memory at a problem).
    >
    >


    I'm not an xslt expert, but you need to elaborate on that. Obviously
    programming in assembly language is not very popular, although it might
    be optimized for machines.

    Since humans write code for machines, humans need languages as well,
    and when problems get very complex, high level languages can provide
    many usefull features to help humans. I once replaced a sort done in
    assembly language with a sort done in pascal. The pascal sort turned
    out to be faster because it was a better sort algorithm, and the
    assembly code was hard to figure out what it did anyway.
    surf, Aug 25, 2006
    #6
  7. surf <> wrote:
    >
    > Matt Garrish wrote:
    >> surf wrote:
    >>
    >> > I had tried to work with XLST a few years ago. I got some simple stuff
    >> > to work, then I started playing with perl XML parsers and the xml:twig
    >> > module in perl. All of this stuff I really liked, so I forgot about
    >> > working with xlst which to me didn't seem like the way to go,
    >> > especially if it got very complex. I'm not sure why anyone would want
    >> > to write a program of any sort in XML anyway ?
    >> >

    >>
    >> You're so behind the times. Everyone is using RXParse for their XML
    >> these days. Be sure and tell your recruiter.
    >>
    >> Matt

    >
    > Under jobs on boston craigslist I searched for xslt and got 222 hits,
    > I got none for RXParse. That doesn't mean it isn't great, just that no
    > one in boston is looking to hire anyone based on that unless it's a
    > tool that is part of some other application.



    Matt's post was an (inside) joke. He should have put a smiley in it.

    RXParse is an abomination of a hack, written by a troll that
    posts here from time to time.

    I wouldn't mention it to a recruiter. :)


    --
    Tad McClellan SGML consulting
    Perl programming
    Fort Worth, Texas
    Tad McClellan, Aug 25, 2006
    #7
  8. surf <> wrote:
    >
    > Tad McClellan wrote:
    >> surf <> wrote:
    >>
    >>
    >> > I'm not sure why anyone would want
    >> > to write a program of any sort in XML anyway ?

    >>
    >>
    >> One Reason:
    >>
    >> XSLT is optimized for machines rather than for humans.
    >>
    >>
    >>
    >> Let's haul this back on-topic:
    >>
    >> Contrast that with Perl, which is optimized for humans at the
    >> expense of the machine (throwing cycles and memory at a problem).
    >>
    >>

    >
    > I'm not an xslt expert, but you need to elaborate on that.

    ^^^^
    ^^^^
    No I don't.


    > Obviously
    > programming in assembly language is not very popular, although it might
    > be optimized for machines.



    I don't need to elaborate on what I said.

    I might need to elaborate on why XSLT is popular though.

    Here's my stab at it: platform independence.


    --
    Tad McClellan SGML consulting
    Perl programming
    Fort Worth, Texas
    Tad McClellan, Aug 25, 2006
    #8
  9. On 2006-08-24, surf <> wrote:
    >
    > Matt Garrish wrote:
    >> surf wrote:
    >>
    >> > I had tried to work with XLST a few years ago. I got some simple stuff
    >> > to work, then I started playing with perl XML parsers and the xml:twig
    >> > module in perl. All of this stuff I really liked, so I forgot about
    >> > working with xlst which to me didn't seem like the way to go,
    >> > especially if it got very complex. I'm not sure why anyone would want
    >> > to write a program of any sort in XML anyway ?
    >> >

    >>
    >> You're so behind the times. Everyone is using RXParse for their XML
    >> these days. Be sure and tell your recruiter.
    >>
    >> Matt

    >
    > Under jobs on boston craigslist I searched for xslt and got 222 hits,
    > I got none for RXParse. That doesn't mean it isn't great, just that no
    > one in boston is looking to hire anyone based on that unless it's a
    > tool that is part of some other application.


    If you search the archives for this newsgroup, you will see that Matt
    was almost certainly applying for the job of "sarcasm". :)

    dha

    --
    David H. Adler - <> - http://www.panix.com/~dha/
    All hail El Cabeza Del Oro! <http://www.panix.com/~dha/elcabeza.html>
    David H. Adler, Aug 25, 2006
    #9
  10. surf

    surf Guest

    Tad McClellan wrote:
    > surf <> wrote:
    > >
    > > Tad McClellan wrote:
    > >> surf <> wrote:
    > >>
    > >>
    > >> > I'm not sure why anyone would want
    > >> > to write a program of any sort in XML anyway ?
    > >>
    > >>
    > >> One Reason:
    > >>
    > >> XSLT is optimized for machines rather than for humans.
    > >>
    > >>
    > >>
    > >> Let's haul this back on-topic:
    > >>
    > >> Contrast that with Perl, which is optimized for humans at the
    > >> expense of the machine (throwing cycles and memory at a problem).
    > >>
    > >>

    > >
    > > I'm not an xslt expert, but you need to elaborate on that.

    > ^^^^
    > ^^^^
    > No I don't.
    >
    >
    > > Obviously
    > > programming in assembly language is not very popular, although it might
    > > be optimized for machines.

    >
    >
    > I don't need to elaborate on what I said.
    >
    > I might need to elaborate on why XSLT is popular though.
    >
    > Here's my stab at it: platform independence.
    >
    >


    I'd like to have a look at a complex xlst example if I could find one.

    My suspicion is that people don't want to learn perl just to transform
    xml,
    although if you allready know perl, it would probably do a better job
    and is available on most machines.
    surf, Aug 25, 2006
    #10
  11. surf

    Matt Garrish Guest

    Tad McClellan wrote:

    > surf <> wrote:
    > >
    > > Matt Garrish wrote:
    > >> surf wrote:
    > >>
    > >> > I had tried to work with XLST a few years ago. I got some simple stuff
    > >> > to work, then I started playing with perl XML parsers and the xml:twig
    > >> > module in perl. All of this stuff I really liked, so I forgot about
    > >> > working with xlst which to me didn't seem like the way to go,
    > >> > especially if it got very complex. I'm not sure why anyone would want
    > >> > to write a program of any sort in XML anyway ?
    > >> >
    > >>
    > >> You're so behind the times. Everyone is using RXParse for their XML
    > >> these days. Be sure and tell your recruiter.
    > >>

    > >
    > > Under jobs on boston craigslist I searched for xslt and got 222 hits,
    > > I got none for RXParse. That doesn't mean it isn't great, just that no
    > > one in boston is looking to hire anyone based on that unless it's a
    > > tool that is part of some other application.

    >
    >
    > Matt's post was an (inside) joke. He should have put a smiley in it.
    >
    > RXParse is an abomination of a hack, written by a troll that
    > posts here from time to time.
    >


    Well, I didn't want to give away the joke. It sounded like he was
    asking for some technical double-talk to bluff his way into jobs, and
    without the smiley it might well have induced him to bring it up in
    conversation. But since you guys ratted me out... ; )

    Matt
    Matt Garrish, Aug 25, 2006
    #11
  12. surf

    surf Guest

    Tad McClellan wrote:
    > surf <> wrote:
    > >
    > > Tad McClellan wrote:
    > >> surf <> wrote:
    > >>
    > >>
    > >> > I'm not sure why anyone would want
    > >> > to write a program of any sort in XML anyway ?
    > >>
    > >>
    > >> One Reason:
    > >>
    > >> XSLT is optimized for machines rather than for humans.
    > >>
    > >>
    > >>
    > >> Let's haul this back on-topic:
    > >>
    > >> Contrast that with Perl, which is optimized for humans at the
    > >> expense of the machine (throwing cycles and memory at a problem).
    > >>
    > >>

    > >
    > > I'm not an xslt expert, but you need to elaborate on that.

    > ^^^^
    > ^^^^
    > No I don't.
    >
    >
    > > Obviously
    > > programming in assembly language is not very popular, although it might
    > > be optimized for machines.

    >
    >
    > I don't need to elaborate on what I said.
    >
    > I might need to elaborate on why XSLT is popular though.
    >
    > Here's my stab at it: platform independence.
    >
    >
    > --


    There has not been allot of response from perl users here, I'm not
    sure if perl programmers have much interest in xml ...

    Here's something I found at

    http://www.kuro5hin.org/story/2002/1/15/1562/95011

    "However, this integration comes at a cost: Verbosity. Terrible
    verbosity. The signal-to-noise ratio of XSLT transformations is
    shameful, easily among the worst of all computer languages in
    widespread use. Non-trivial XSLT transformations almost appear
    obfuscated."
    surf, Aug 26, 2006
    #12
  13. surf

    Matt Garrish Guest

    surf wrote:

    > > surf <> wrote:
    > > >
    > > >> surf <> wrote:
    > > >>
    > > >>
    > > >> > I'm not sure why anyone would want
    > > >> > to write a program of any sort in XML anyway ?
    > > >>

    >
    > There has not been allot of response from perl users here, I'm not
    > sure if perl programmers have much interest in xml ...
    >


    I don't know that there's any correlation to be made between the lack
    of interest in your post and the use of xml by perl programmers. If
    anything, it just shows that you asked an uninteresting and slighty
    off-topic question that's getting the attention it merits.

    If you have any real questions about xslt or xml and perl, go ahead and
    ask. If you just want an explanation of the merits of xslt you're
    asking in the wrong forum.

    And as a word of advice, you might consider laying off the
    over-simplifications in the future. Your remark about why anyone would
    use xml shows your level of understanding is quite low, and that will
    stop most people from reading anything else you have to say.

    Matt
    Matt Garrish, Aug 26, 2006
    #13
  14. surf

    surf Guest

    Matt Garrish wrote:
    > surf wrote:
    >
    > > > surf <> wrote:
    > > > >
    > > > >> surf <> wrote:
    > > > >>
    > > > >>
    > > > >> > I'm not sure why anyone would want
    > > > >> > to write a program of any sort in XML anyway ?
    > > > >>

    > >
    > > There has not been allot of response from perl users here, I'm not
    > > sure if perl programmers have much interest in xml ...
    > >

    >
    > I don't know that there's any correlation to be made between the lack
    > of interest in your post and the use of xml by perl programmers. If
    > anything, it just shows that you asked an uninteresting and slighty
    > off-topic question that's getting the attention it merits.
    >
    > If you have any real questions about xslt or xml and perl, go ahead and
    > ask. If you just want an explanation of the merits of xslt you're
    > asking in the wrong forum.
    >
    > And as a word of advice, you might consider laying off the
    > over-simplifications in the future. Your remark about why anyone would
    > use xml shows your level of understanding is quite low, and that will
    > stop most people from reading anything else you have to say.
    >


    Tad seem to imply perl is less suited for XML due to being optimized
    for humans,
    I think that is more of an oversimplication of anything I have said.
    surf, Aug 26, 2006
    #14
  15. surf

    Matt Garrish Guest

    surf wrote:

    > Matt Garrish wrote:
    > > And as a word of advice, you might consider laying off the
    > > over-simplifications in the future. Your remark about why anyone would
    > > use xml shows your level of understanding is quite low, and that will
    > > stop most people from reading anything else you have to say.
    > >

    >
    > Tad seem to imply perl is less suited for XML due to being optimized
    > for humans,
    > I think that is more of an oversimplication of anything I have said.


    He never said anything of the sort:

    <requote Tad's earlier post>
    XSLT is optimized for machines rather than for humans.

    Let's haul this back on-topic:

    Contrast that with Perl, which is optimized for humans at the
    expense of the machine (throwing cycles and memory at a problem).
    </quote>

    He made a valid statement about using XSLT for transforming XML as
    opposed to using perl, which is that XSLT is better optimized than
    anything you'll be able to do in pure perl. That doesn't mean that perl
    is not good for XML, only that you'll get better speed from an XSLT
    processor.

    There is a price to be paid for using perl, but anyone who uses perl
    for anything (not just XML) is aware of that price and can live with
    it. If your needs go beyond the sometimes limited boundaries of XSLT,
    then perl is a good choice, and I see nothing in Tad's earlier post to
    refute that or to say that it's not. Every company I've worked for has
    used perl for at least some of their xml needs, so it must be doing
    something right.

    Matt
    Matt Garrish, Aug 26, 2006
    #15
  16. surf <> wrote:
    >
    > Matt Garrish wrote:
    >> surf wrote:
    >>
    >> > > surf <> wrote:
    >> > > >
    >> > > >> surf <> wrote:
    >> > > >>
    >> > > >>
    >> > > >> > I'm not sure why anyone would want
    >> > > >> > to write a program of any sort in XML anyway ?
    >> > > >>
    >> >
    >> > There has not been allot of response from perl users here, I'm not
    >> > sure if perl programmers have much interest in xml ...
    >> >

    >>
    >> I don't know that there's any correlation to be made between the lack
    >> of interest in your post and the use of xml by perl programmers. If
    >> anything, it just shows that you asked an uninteresting and slighty
    >> off-topic question that's getting the attention it merits.
    >>
    >> If you have any real questions about xslt or xml and perl, go ahead and
    >> ask. If you just want an explanation of the merits of xslt you're
    >> asking in the wrong forum.
    >>
    >> And as a word of advice, you might consider laying off the
    >> over-simplifications in the future. Your remark about why anyone would
    >> use xml shows your level of understanding is quite low, and that will
    >> stop most people from reading anything else you have to say.
    >>

    >
    > Tad seem to imply perl is less suited for XML due to being optimized
    > for humans,



    Huh?


    If you are a human, then you are likely to prefer using Perl.

    If you are a machine (or writing one), then you are likely to
    prefer using XSLT.


    I am a human.

    I always use Perl for processing markup languages, I never use XSLT.

    But that's just me.


    > I think that is more of an oversimplication of anything I have said.



    I cannot fathom how what I said (that was not quoted, BTW) could
    imply _your_ incorrect oversimplication.


    --
    Tad McClellan SGML consulting
    Perl programming
    Fort Worth, Texas
    Tad McClellan, Aug 27, 2006
    #16
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Stylus Studio
    Replies:
    0
    Views:
    632
    Stylus Studio
    Aug 3, 2004
  2. Benjamin Hillsley
    Replies:
    3
    Views:
    1,655
    Dimitre Novatchev
    Sep 25, 2003
  3. ted
    Replies:
    1
    Views:
    610
    Laurens
    Jan 26, 2004
  4. Replies:
    2
    Views:
    704
    Henry S. Thompson
    Oct 19, 2005
  5. Replies:
    4
    Views:
    651
Loading...

Share This Page