Tempura - 変更履歴

0.1.2 (0.1からの変更点) - 2004.02.06

_attr_* 属性の扱いを変更

属性値を評価したときの振る舞いを、_child_ や _self_ と同じタイプの仕様 に変更しました。_attr_* 属性が影響を与える属性のことを、「ターゲット属 性」と呼ぶとして、属性値の評価結果が:

それ以外の場合はこれまでと同様に

します。

この変更は、HTMLのoption要素のselected属性のように、存在の有無そのもの が意味を持つ属性のコントロールを可能にするために、実装しました。

また、この変更は、Tempura 0.1.1以前を利用した一部のソフトウェア、具体 的には、_attr_*属性値の評価結果が nil または false であることに依存し ているソフトウェアの動作に、影響を及ぼす可能性があります。

展開前:

<option _attr_selected="nil" selected="true"/>
<option _attr_selected="false" selected="true"/>
<option _attr_selected="%(false)" selected=="true"/>
<option _attr_selected="true"/>
<option _attr_selected="%(true)"/>

展開後:

<option/>
<option selected="true"/>
<option selected=="false"/>
<option selected="true"/>
<option selected="true"/>

0.1.1 (0.1からの変更点) - 2004.01.29

_action_ 属性

ビューレベルでのイベント送信先(action)の変更に対応しました。_event_属 性を持つformもしくはa要素に、_action_属性を指定すると、イベントの送信 先はdefault_actionから、_action_属性で指定された値に変更されます。

展開前:

<form method="POST" _event_="hello" action="dummy.cgi" _action_="alt.cgi"/>
<a href="dummy.cgi" _action_="alt.cgi" _event_="hello">hello</a>

展開後:

<form method="POST" action="alt.cgi"><input type="hidden" name="event" value="hello"/></form>
<a href="alt.cgi?event=hello">hello</a>

form要素のmethod属性

_event_属性を持つform要素で、展開前に存在するmethod属性を上書きしない ようにしました*1

展開前:

<form _event_="hello"/>
<form method="get" _event_="hello"/>

展開後:

<form method="POST" action="alt.cgi"><input type="hidden" name="event" value="hello"/></form>
<form method="get" action="alt.cgi"><input type="hidden" name="event" value="hello"/></form>

*1今まではPOSTで上書きしていた