문제

I have to check if a value matches a certain string, and the input may be in any case.

<xsl:if test="$adminStatus='Down'">
  do something
</xsl:if>
도움이 되었습니까?

해결책

Use the translate() function on both $adminStatus and target value.

How can I convert a string to upper- or lower-case with XSLT?

다른 팁

You use the translate function to convert all upper case to lower case.

<xsl:if test="translate($adminStatus, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz') = 'down'">
  do something
</xsl:if>
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top