Perl XML::XSLT Error get-node-from-path: Don't know what to do with path

Posted on 2009-02-13
Last Modified: 2013-11-18
Hi there,

I am getting the following error when I try to run a perl script that uses an XSL stylesheet to transform an XML feed.

get-node-from-path: Don't know what to do with path /$year <= 2150 !!!

I am using the same XSL and XML files in a Java implementation and a PHP implementation of the application and I do not encounter any problems. It looks like the perl processor is having a problem with the following line in the XSL
<xsl:if test="$year &lt;= 2150">
$year is a param that has been passed to the template. See the attach code snippet for more details.

<xsl:call-template name="incrementYear">

   <xsl:with-param name="year">2008</xsl:with-param>


<xsl:template name="incrementYear">

       <xsl:param name="year"/>

           <xsl:if test="$year &lt;= 2150">

                application specific logic is here


             <xsl:call-template name="incrementYear">

             <xsl:with-param name="year" select="$year + 1"/>


Open in new window

Question by:2djohn
    LVL 84

    Expert Comment

    the documentation for  XML::XSLT says that support for  xsl:if   is limited

    Author Comment

    Thanks for your input ozo. I seen the man page says the support is limited for both xsl:if and xsl:when. I'm interested in finding a workaround either in Perl or XSL which will allow me to achieve the same result as illustrated in the attached sample code.
    LVL 1

    Expert Comment

    Try to use sequences. But maybe it's available only in xslt 2.0.

    <xsl:function name="my:func">
      <xsl:param name="year">
      <!-- your logic here -->

    <xsl:value-of select="for $year in (2008 to 2150) return my:func($year)"/>

    Accepted Solution

    The Perl XSLT Processor provided here

    processes my XLT files without any problems.


    Featured Post

    What Is Threat Intelligence?

    Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

    Join & Write a Comment

    Suggested Solutions

    Title # Comments Views Activity
    PHP PDO get the error if exists 3 53
    Unattended XML settings 4 57
    Custom Ribbon doesn't refresh 7 42
    Problem to file 3 29
    Preface This is the third article about the EE Collaborative Login Project. A Better Website Login System ( introduces the Login System and shows how to implement a login page. The EE Collaborative Logi…
    I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
    The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.
    The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now