RE: [xsl] system call?

Subject: RE: [xsl] system call?
From: cknell@xxxxxxxxxx
Date: Mon, 19 Sep 2005 13:41:51 -0400
Pass the year you want to save as a parameter to your stylesheet. The method for doing this varies slightly by processor. In you stylesheet you declare a parameter like this:

<xsl:param name="savethis" />

Then you re-write you template like this:

 <xsl:if test="$year=$savethis">

Charles Knell
cknell@xxxxxxxxxx - email

-----Original Message-----
From:     TGolshan@xxxxxxxxxxxx
Sent:     Mon, 19 Sep 2005 10:30:51 -0700
To:       xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject:  [xsl] system call?

I am trying to disable URL links from legacy files. I am not sure how to 
do this without hard-coding the $year to the current year, 2005. Any 
better ideas? I have heard that one might be able to do a system call, but 
that completely escaped me. 

Thanks in advance,


XML file

<p><url>URL TEXT HERE</url></p>

<xsl:variable name="year">
        <xsl:value-of select="article/fm/hdr/hdr2/pdt/yr"/>

<xsl:template match="url">
                <xsl:if test="$year='2005'">
                                        <xsl:when test="
                                                <xsl:attribute name="href
"><xsl:value-of select="text()"/></xsl:attribute>
                                        <xsl:when test="
                                                <xsl:attribute name="href
"><xsl:value-of select="text()"/></xsl:attribute>
                                                <xsl:attribute name="href
"><xsl:value-of select="concat('http://',text())"/></xsl:attribute>
                                        <xsl:attribute name="target">blank
                <xsl:if test="$year!='2005'">

Current Thread
  • [xsl] system call?
    • TGolshan - Mon, 19 Sep 2005 10:30:51 -0700
      • JBryant - Mon, 19 Sep 2005 13:06:02 -0500
      • <Possible follow-ups>
      • cknell - Mon, 19 Sep 2005 13:41:51 -0400 <=