jcs:statement Template
XSLT 구문
<xsl:call-template name="jcs:statement"> <xsl:with-param name="dot" select="expression"/> </xsl:call-template>
SLAX 구문
call jcs:statement($dot=expression);
설명
또는 <xnm:warning> 요소에 포함 <xnm:error> 하기에 적합한 요소를 생성합니다<statement>. 이 위치의 기본값은 XML 계층의 현재 위치인 " . "입니다. 오류가 XML 계층의 현재 위치에 없는 경우, SLAX 스크립트의 매개변수 또는 XSLT 스크립트의 매개변수 속성에 대해 select 유효한 XPath 표현식 dot 을 포함하여 템플리트를 호출할 때 기본값을 dot 변경할 수 있습니다.
매개 변수
dot |
계층 수준을 지정하는 XPath 식입니다. 기본 위치는 스크립트가 현재 평가 중인 XML 계층 구조에서의 위치입니다. SLAX 스크립트의 매개변수 또는 XSLT 스크립트의 매개변수 속성에 대해 |
사용 예
다음 예제는 커밋 스크립트에서 템플릿을 호출하는 jcs:statement 방법을 보여줍니다.
<xnm:error> <xsl:call-template name="jcs:edit-path"/> <xsl:call-template name="jcs:statement"> <xsl:with-param name="dot" select="mtu"/> </xsl:call-template> <message> <xsl:text>SONET interfaces must have a minimum MTU of </xsl:text> <xsl:value-of select="$min-mtu"/> <xsl:text>.</xsl:text> </message> </xnm:error>
최대 전송 단위(MTU) 설정이 지정된 최소 <xnm:error> 값보다 작은 SONET/SDH 인터페이스를 포함하는 구성을 커밋하면 요소는 다음과 같은 CLI 출력을 생성합니다.
[edit] user@host# commit
[edit interfaces interface so-1/2/3] 'mtu 576;' # mtu statement generated by the jcs:statement template SONET interfaces must have a minimum MTU of 2048. error: 1 error reported by commit scripts error: commit script failure
MTU 설정 테스트는 요소에서 <xnm:error> 수행되지 않습니다. 전체 예제는 예: 최소 MTU 설정 적용을 참조하십시오.