http://qs321.pair.com?node_id=238989


in reply to XML::XSLT not transforming xml

Your post is too large to do anything meaningful with. I did notice your dubious construction <xsl:value-of select="//*[local-name()='service']/*[local-name()='port']/*[local-name()='address']/@location"/>. You probably want to write that as <xsl:value-of select="//service/port/address/@location"/>. Your usage of local-name() is unusual.


Seeking Green geeks in Minnesota

Replies are listed 'Best First'.
(jptxs) Re: XML::XSLT not transforming xml
by jptxs (Curate) on Feb 27, 2003 at 04:27 UTC
    And if I didn't post all the xml and xsl someone else would have complained that it wasn't there, right? =]

    Update: OK, changing that query worked. But why? Any why does it work in the other processor just fine? Now it works, but I'm more confused than ever...

    Anyway, I know nothing about this XML stuff. I'm trying to learn it. As I said in the original post, these files work fine using other XSLT processors. So as strange as the structure may be (and the tutorial that they came from even made a note to point out the local-name() structure), it seems to be OK according to other solutions.

    We speak the way we breathe. --Fugazi

        ajt, thanks for all the good pointers. I've read Learning XML over the last few days and switched to XML::LibXSLT. I now see what was happening in my original problem thanks to both of these. Thanks for pointing me at LibXSLT.

        We speak the way we breathe. --Fugazi

        Well, I guess the perl is fine since no one has said otherwise. That was what I was concerned about. RTFMing on XML is exactly what I'm in the process of doing. So references well appreciated. Guess it's off to read...

        We speak the way we breathe. --Fugazi

      I didn't think of it until just now but the use of the prepended // also imposes a performance penalty on your code. If you can specify it as a rooted element that's a win.


      Seeking Green geeks in Minnesota