XSLT Sample default

ノード <sample title="XSLT Sample default" empty="" />について、属性と条件文の関係は以下のようになる。

@title [XSLT Sample default] : 属性値が空でない場合に真になる条件文
boolとの比較
test="@title"
test="boolean(@title)"
test="@title != false()"
文字列との比較 (変換無し)
test="@title != ''"
文字列との比較 (変換有り)
test="string(@title) != ''"
test="stirng-length(@title) != 0"
@empty [(空文字列)] : 属性値が空の場合に真になる条件文
boolとの比較
test="@empty"
test="boolean(@empty)"
test="@empty != false()"
文字列との比較 (変換無し)
test="@empty = ''"
文字列との比較 (変換有り)
test="string(@empty) = ''"
test="stirng-length(@empty) = 0"
@notexist [(属性が指定されていない)] : 属性が省略された場合に真になる条件文
boolとの比較
test="not(@notexist)"
test="@notexist = false()"
文字列との比較 (変換無し)
文字列との比較 (変換有り)
test="string(@notexist) = ''"
test="stirng-length(@notexist) = 0"