.+document:  ChangeLog
.?release:   $Release: 3.2.0 $
.?updated:   $Date$


$ Release 3.2.0 (2010-10-26)


  [Enhancements]


    * Ruby 1.9 support.


    * Class selector and tag selector support.
	--------------------
	/* tag selector */
	h1 {
	  Value: title;
	}
	/* class selector */
	.list {
	  attrs: 'bgcolor' color;
	}
	--------------------


    * Multi selector support
	--------------------
	/* OK - multi selector */
	#foo, #bar, .baz {
	  value: item;
	}
	/* NG - compound selector is not supported */
	#foo .baz {   // parse error
	  value: item;
	}
	--------------------


    * Attribute variable support. Attribute variable represents attribute
      value of element. Its notation is '$(attr-name)'.

      ex. form.html
	--------------------
	<form action="create">
	 Username: <input type="text" id="comment_username" size="20"><br>
	 Comment: <textarea id="comment_body" cols="40" rows="3"></textarea><br>
	 <input type="submit" id="mark:comment_submit" value="Send comment">
	</form>
	--------------------

      ex. form.plogic
	--------------------
	form {
	  stag:  start_form_tag :action=>'$(action)';
	}
	#comment_username {
	  elem:  text_field 'comment', 'username', :size=>$(size);
	}
	#comment_body {
	  elem:  text_area 'comment', 'body', :rows=>$(rows), :cols=>$(cols);
	}
	#comment_submit {
	  elem:  submit_tag '$(value)';
	}
	--------------------

      ex. compile
	====================
	$ kwartz -p form.plogic form.html
	<%= start_form_tag :action=>'create' %>
	 Username: <%= text_field 'comment', 'username', :size=>20 %><br>
	 Comment: <%= text_area 'comment', 'body', :rows=>3, :cols=>40 %><br>
	 <%= submit_tag 'Send comment' %>
	</form>
	====================


    * New property 'before:' and 'after:' are supported.
      They mean prework and postwork of presentation logic respectively.
      
      ex. example.html
	--------------------
	<!-- Groups -->
	<p id="mark:groups">group name</p>
	
	<!-- Members -->
	<p id="mark:members">member name</p>
	--------------------
      
      ex. example.plogic
	--------------------
	#groups {
	  before: {
	    list = @groups
	  }
	  after: {
	    group_count = count
	  }
	}
	#members {
	  before: {
	    list = @members
	  }
	  after: {
	    member_count = count
	  }
	}
	
	/* common properties ('Value:' and 'logic:') */
	#groups, #members {
	  Value: item;
	  logic: {
	    count = 0
	    for item in list
	      count += 1
	      _stag    # start-tag
	      _cont    # content
	      _etag    # end-tag
	    end
	  }
	}
	--------------------

      compile:
	====================
	$ kwartz -p example.plogic example.html
	<!-- Groups -->
	<%     list = @groups %>
	<%     count = 0 %>
	<%     for item in list %>
	<%       count += 1 %>
	<p><%=h item %></p>
	<%     end %>
	<%     group_count = count %>
	
	<!-- Members -->
	<%     list = @members %>
	<%     count = 0 %>
	<%     for item in list %>
	<%       count += 1 %>
	<p><%=h item %></p>
	<%     end %>
	<%     member_count = count %>
	====================


    * Selector '#DOCUMENT' now suppprts 'logic:' property.
      This is convenient for Extract Element/Content Pattern.

      ex. doc.html
	--------------------
	<html>
	  <body>
	    <h1 id="mark:title">...title...</h1>
	    <p>...</p>
	    <div id="mark:contents">
	      <table>
	        <tr id="mark:list">
		  <td>@{item}@</td>
		</tr>
	      </table>
	    </div>
	  </body>
	</html>
	--------------------

      ex. doc.plogic 
	--------------------
	#DOCUMENT {
	  /* retrieve element of 'id="mark:title"'
	     and content of 'id="mark:contents"' */
	  logic: {
	    _element(title)
	    _content(contents)
	  }
	}
	#title {
	  Value: title;
	}
	#list {
	  logic: {
	    for item in list
	      _elem
	    end
	  }
	}
	--------------------

      compile:
	====================
	    <h1><%=h title %></h1>
	      <table>
	<%     for item in list %>
	        <tr>
		  <td><%=h item %></td>
		</tr>
	<%     end %>
	      </table>
	====================


    * Embedded expression '@{...}@' and '@!{...}@' now represents both
      language-independent expression and language-depend expression.
      If expression matches the following pattern then it is recognized
      as language-independent expression, else as language-depend
      expression.
      - variable
      - object.property
      - hash['key'], hash["key"], hash[:key]
      - array[123], array[index]

      ex. expr.html
	--------------------
	@!{variable}@
	@!{object.property}@
	@!{hash['key']}@
	@!{hash[:key]}@
	@!{array[0]}@
	@!{array[index]}@
	@!{$unknown->style}@
	--------------------

      compile:
	====================
	$ kwarz -l eruby expr.html
	<%= variable %>
	<%= object.property %>
	<%= hash['key'] %>
	<%= hash["key"] %>
	<%= hash[:key] %>
	<%= array[0] %>
	<%= array[index] %>
	<%= $unknown->style %>
	$ kwartz -l php expr.html
	<?php echo $variable; ?>
	<?php echo $object->property; ?>
	<?php echo $hash['key']; ?>
	<?php echo $hash["key"]; ?>
	<?php echo $hash['key']; ?>
	<?php echo $array[0]; ?>
	<?php echo $array[$index]; ?>
	<?php echo $unknown->style; ?>
	====================


    * Directive 'value', 'elem', 'stag', 'cont', 'etag', and 'default'
      can be language-independent if their argument is one of the
      following format.
      - variable
      - object.property
      - hash['key'], hash["key"], hash[:key]
      - array[123], array[index]

      ex. value.html
	--------------------
	<p id="Value:user">foo</p>
	<p id="value:user.name">foo</p>
	<p id="value:user['name']">foo</p>
	<p id="value:user[:name]">foo</p>
	<p id="value:user[0]">foo</p>
	<p id="value:user[i]">foo</p>
	--------------------

      compile:
	====================
	$ kwartz -l eruby value.html
	<p><%=h user %></p>
	<p><%= user.name %></p>
	<p><%= user['name'] %></p>
	<p><%= user[:name] %></p>
	<p><%= user[0] %></p>
	<p><%= user[i] %></p>
	$ kwartz -l php value.html
	<p><?php echo htmlspecialchars($user); ?></p>
	<p><?php echo $user->name; ?></p>
	<p><?php echo $user['name']; ?></p>
	<p><?php echo $user['name']; ?></p>
	<p><?php echo $user[0]; ?></p>
	<p><?php echo $user[$i]; ?></p>
	====================


  [Changes]

    * Properties 'begin:' and 'end:' are obsolete (but still available
      for compatibility).  You should use 'before:' and 'after:'
      instead of 'begin:' and 'end:'.



$ Release 3.1.2 (2006-10-22)

  [enhancements from 3.1.1]

    * Error reporting improved when using with Ruby on Rails.
      'kwartz/helper/rails.rb' now show template filename and
      linenumber on where exception raised.
      Notice that you have to read *.cache file instead of *.html
      or *.plogic.



$ Release 3.1.1 (2006-09-29)

  [changes from 3.1.0]

    * Testdata and documents are integrated with Kwartz-php.



$ Release 3.1.0 (2006-09-24)

  [enhancements from 3.0.0]

    * Support of Ruby on Rails improved.
      Kwartz now provides template class for RoR.
      You don't have to convert *.html and *.plogic into *.rhtml.
      Kwartz directly render HTML page from *.html and *.plogic.
      See Kwartz Users' Guide for detail.
      http://www.kuwata-lab.com/kwartz/kwartz3-users-guide.03.html

    * New example 'example/rails2' added.
      It is a good example to use Kwartz with Ruby on Rails.

    * Command-line option '-l rails' support.  This option extends
      directives in *.html to support Rails helper methods.
      See Kwartz Users' Guide for detail.
      http://www.kuwata-lab.com/kwartz/kwartz3-users-guide.03.html#rails-helper-methods

    * (experimental) Embedded pattern '@{...}@' and  '@!{...}@' supported.
      They are equivarent to '<%=h ... %>' and '<%= ... %>' of ERB,
      but they are available for PHP and JSP as well as eRuby.

    * New command line optin '-a defun' support. It generates
      Ruby/PHP function to generate view page from *.html and *.plogic.

  [changes from 3.0.0]

    * Directive attribute name is changed from 'title' to 'kw:d'.
      You can change it in configuration file ('kwartz/config.rb').



$ Release 3.0.0

  [enhancements from 2.0.4]

    * Presentation logic is described in target language.
      It means that you can write presentatin logic in Ruby, PHP,
      and so on.

    * New properties 'elem:', 'stag:', 'cont:', 'etag:' are added.
      They replaces element, start-tag, content, end-tag with
      expression value. This is useful especially for Rails.

      new.html : presentation data file
      --------------------
      <form id="mark:form">
        Name: <input type="text" id="user_name">
        <input type="submit" id="mark:submit">
      </form>
      --------------------

      new.plogic : presentation logic file
      --------------------
      #form {
        stag:  start_form_tag :action=>'create';
      }
      #user_name {
        elem:  text_field 'user', 'name';
      }
      #submit {
        elem:  submit_tag 'Create';
      }
      --------------------

      compile:
      ====================
      $ kwartz -p new.plogic new.html > new.rhtml
      ====================

      new.rhtml : compiled output script
      --------------------
      <%= start_form_tag :action=>'create' %>
        Name: <%= text_field 'user', 'name' %>
        <%= submit_tag 'Create' %>
      </form>
      --------------------

      See 'examples/rails1' for more details about Rails and Kwartz.

    * New keyword '_elem' added. '_elem' means element and
      it is equivarent to '_stag' + '_cont' + '_etag'.

    * New language 'rails' addes. It uses '<% -%>' instead of '<% %>'
      as embedded pattern.

    * New command-line option '-L layout' specifies layout file.
      ====================
      $ kwartz -p new.plogic -L layout.html new.html > new.rhtml
      ## this is equivarent to the following:
      ## $ kwartz -p new.plogic -i new.html layout.html > new.rhtml
      ====================

    * ...and more


  [changes from 2.0.4]

    * Property 'plogic:' is renamed to 'logic:'.

    * '@stag', '@cont', '@etag' is changed to
      '_stag', '_cont', '_etag' respectively.

    * Directive format is changed.
      See reference manual for details.

    * Directive attribute is changed from 'kw:d' to 'title'.
      (this may be change in the future.)

    * Directive 'id="replace:xxx"' is renamed to
      'id="replace_element_with_element:xxx"' and
      'id="replace_element_with_content:xxx"'.

    * Directive 'id="placeholder:xxx" is renamed to
      'id="relace_content_with_element:xxx"' and
      'id="relace_content_with_content:xxx"'.

    * 'analyze' action is obsolete (because presentation logic
      is described in Ruby, PHP, and so on).

    * 'defun' action is currently not supported
      (but is planned to be implemented in the future release).

    * Velocity is not supported.

    * Project name in RubyForge.org is changed from 'kwartz-ruby'
      to 'Kwartz', and gem file is also changed.

    * ...and more

.-document:
