그래서 저는 템플릿에서 정의 된 매개 변수 이름을 호출하는 방법을 알아 내려고합니다.
<?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>
매개 변수 이름 "시간"에서 '3'의 값을 지정했습니다.이 값은 오전 3시입니다. 내 최종 목표는 매일 오전 3 시까 지 'server4'로의 보내기를 '지연'하는 것이며 이미 사용 가능한 전역 매개 변수를 사용하여 그렇게 할 수 있다고 생각합니다. 서버 1, 2 및 3은 올바르게 작동하는 즉시 수신합니다.
나는 이것을 바로 부르고 있는가?
찾아 주셔서 감사합니다.
이어야합니다 select="$hour"
.
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다