Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
オプションのブール属性を持つカスタムタグがあるとしましょう。
その属性のデフォルト値もfalseです。
それを使用するために、開発者は次のようなものを書きます
="true"-partが必須ではないことを定義する方法はありますか?だからそれ<xyz:mytag optAttr />は<xyz:mytag optAttr="true" />?
="true"
<xyz:mytag optAttr />
<xyz:mytag optAttr="true" />
少なくともHTMLのチェックボックスでは、これは非常に一般的です。
いいえ、できません。
JSPカスタムタグは、この種の宣言が許可されていないXML構文に厳密に従います(HTMLとは異なります)。