Question

So, I'm trying to figure out how to call a defined param name from a template

    <?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  <xsl:output method="xml"/>

  <!--
   The following parameters are made available by the application:
   source-aet   - AET of the Storage SCU from which the series was received
   retrieve-aet - AET of the Query Retrieve SCP from which the series can be retrieved
   year  - The current year
   month - The current month (1=Jan, 2=Feb ..)
   date  - The current day of the month
   day   - The current day of the week (0=Sun, 1=Mon ..)
   hour  - The current hour of the day

   These parameters may be to define rules that depend on the source or retrieve AET
   or on the current date or time.

   An example of the parameters that are made available to this stylesheet is as follows:
   <xsl:param name="source-aet">DCMSND</xsl:param>
   <xsl:param name="retrieve-aet">SERVERAET</xsl:param>
   <xsl:param name="month">4</xsl:param>
   <xsl:param name="date">30</xsl:param>
   <xsl:param name="day">1</xsl:param>
   <xsl:param name="hour">15</xsl:param>
  -->
  <xsl:param name="source-aet"/>
  <xsl:param name="retrieve-aet"/>
  <xsl:param name="year"/>
  <xsl:param name="month"/>
  <xsl:param name="date"/>
  <xsl:param name="day"/>
  <xsl:param name="hour">3</xsl:param>

 <xsl:template match="/dataset">
    <!-- forward CATH LAB Studies EVERYWHERE -->
    <xsl:variable name="Station" select="attr[@tag='00081010']"/>
    <xsl:variable name="MOD" select="attr[@tag='00080060']"/>
      <xsl:if test="contains($Station,'J')">
        <xsl:if test="$MOD='XA'">
          <destination aet="SERVER1"/>
          <destination aet="SERVER2"/>
          <destination aet="SERVER3"/>
          <destination aet="SERVER4" select="hour"/>
          </xsl:if>
      </xsl:if>
 </xsl:template>
</xsl:stylesheet>

In the param name "hour" I've given it a value of '3', which I am hoping is 3am. My end goal is to 'delay' the send to 'server4' until 3am every day and I think I can do that by using the global parameters that have already been made available. Server 1, 2, & 3 receive immediately which is working correctly.

am I calling this right?

thanks for looking and all the help!

Was it helpful?

Solution

It should be: select="$hour".

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top