<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://dev.eiffel.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Sandrod</id>
		<title>EiffelStudio: an EiffelSoftware project - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="https://dev.eiffel.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Sandrod"/>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/Special:Contributions/Sandrod"/>
		<updated>2026-05-25T21:07:33Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.24.1</generator>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=Xebra_Taglib_Form&amp;diff=13535</id>
		<title>Xebra Taglib Form</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=Xebra_Taglib_Form&amp;diff=13535"/>
				<updated>2009-11-30T13:49:31Z</updated>
		
		<summary type="html">&lt;p&gt;Sandrod: /* Form */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Xebra]]&lt;br /&gt;
[[Xebra About|About]] | [[Xebra Installation|Installation]] |  [[Xebra Documentation|Documentation]] |  [[Xebra Tutorial|Tutorials]] | [[Xebra FAQ|Frequently Asked Questions]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The Form Tag Library captures all the functionality related to html forms. This includes automatic wrapping of input to objects and validation.&lt;br /&gt;
&lt;br /&gt;
===Form===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Tag&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;f:form class=&amp;quot;...&amp;quot; variable=&amp;quot;...&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/f:form&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
All form tags have to be contained in a f-form. A variable and class can be optionally defined to automatically wrap input forms to an object. This variable is known in the scope of the form. Note that forms cannot be nested, as in normal xhtml forms.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;f:button text=&amp;quot;...&amp;quot; action=&amp;quot;...&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
A button is a normal html button. It is associated with a controller function (&amp;quot;action&amp;quot;) which is executed if the validation of all inputs field where successful. The automatically wrapped object is then passed to the action. The text designates the Label on the button.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;f:input_text value=&amp;quot;...&amp;quot; name=&amp;quot;...&amp;quot; text=&amp;quot;...&amp;quot; type=&amp;quot;...&amp;quot; label=&amp;quot;...&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
The designated normal html inputs. Additionally they provide a name which makes them identifiable for validation output. f-validator tags can be added to the inputs to define validators as in all wrappable inputs. The type argument is optional and defines the type of the input (for instance 'secret').&lt;br /&gt;
The optional 'label' attribute adds a label to the input.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;f:text_area value=&amp;quot;...&amp;quot; name=&amp;quot;...&amp;quot; text=&amp;quot;...&amp;quot; rows=&amp;quot;...&amp;quot; cols=&amp;quot;...&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
Basically the same as the input fields but with some additional auxiliary textarea-specific attributes (rows, cols).&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;f:drop_down_list items=&amp;quot;...&amp;quot; name=&amp;quot;...&amp;quot; value=&amp;quot;...&amp;quot; [label=&amp;quot;...&amp;quot;] [selected_index=&amp;quot;...&amp;quot;]/&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
This tag generates the equivalent to a &amp;lt;xml&amp;gt;&amp;lt;select&amp;gt;&amp;lt;option&amp;gt;...&amp;lt;/option&amp;gt;...&amp;lt;/select&amp;gt;&amp;lt;/xml&amp;gt; statement. items designates the list to be used in the drop down and type is an optional parameter. It defines the type of the items. If not set, it assumes Strings. Selected_index defines the item that should be selected. The value provided has to match with the &amp;quot;is_equal&amp;quot; feature of the object.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;f:check_box name=&amp;quot;...&amp;quot; label=&amp;quot;..&amp;quot; value=&amp;quot;...&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
A normal checkbox which is automatically wrapped to a boolean.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;f:command_link text=&amp;quot;...&amp;quot; action=&amp;quot;...&amp;quot; variable=&amp;quot;...&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
A command link is a html link. It acts though like a button and executes the defined action on the controller. If a variable is defined, it will be passed to the action (feature). Variable names can be used from f-form or xeb-iterate.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;f:validator class=&amp;quot;...&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
A validator validates an input. It can be added to input fields (or textareas) to check the input.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;f:validation_result name=&amp;quot;...&amp;quot; variable=&amp;quot;...&amp;quot;&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/f:validation_result&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
Stores a variable with the name of the variable attribute. It contains the error message. If there is more than one error it iterates over all errors. In this way formatting of errors is (almost) free to the designer.&lt;br /&gt;
|}&lt;br /&gt;
====Example====&lt;br /&gt;
For the forms framework we will use a simple display of reservations with an input mask and delete command links.&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
	&amp;lt;tr&amp;gt;&lt;br /&gt;
		&amp;lt;td&amp;gt;Name&amp;lt;/td&amp;gt;&lt;br /&gt;
		&amp;lt;td&amp;gt;Date&amp;lt;/td&amp;gt;&lt;br /&gt;
		&amp;lt;td&amp;gt;Persons&amp;lt;/td&amp;gt;&lt;br /&gt;
		&amp;lt;xeb:container render=&amp;quot;authenticated_admin&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;td&amp;gt;Delete&amp;lt;/td&amp;gt;&lt;br /&gt;
		&amp;lt;/xeb:container&amp;gt;&lt;br /&gt;
		&amp;lt;xeb:container render=&amp;quot;not_authenticated_admin&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;td&amp;gt;Details&amp;lt;/td&amp;gt;&lt;br /&gt;
		&amp;lt;/xeb:container&amp;gt;&lt;br /&gt;
	&amp;lt;/tr&amp;gt;&lt;br /&gt;
	&amp;lt;f:form&amp;gt;&lt;br /&gt;
	&amp;lt;xeb:iterate list=&amp;quot;global_state.db.reservations&amp;quot; variable=&amp;quot;reservation&amp;quot; type=&amp;quot;RESERVATION&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;tr&amp;gt;&lt;br /&gt;
			&amp;lt;td&amp;gt;&amp;lt;xeb:display feature=&amp;quot;#{reservation.name}&amp;quot;/&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
			&amp;lt;td&amp;gt;&amp;lt;xeb:display feature=&amp;quot;#{reservation.date}&amp;quot;/&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
			&amp;lt;td&amp;gt;&lt;br /&gt;
			&amp;lt;f:command_link label=&amp;quot;Delete&amp;quot; action=&amp;quot;delete&amp;quot; variable=&amp;quot;reservation&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;/td&amp;gt;					&lt;br /&gt;
		&amp;lt;/tr&amp;gt;&lt;br /&gt;
	&amp;lt;/xeb:iterate&amp;gt;&lt;br /&gt;
	&amp;lt;/f:form&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;h2&amp;gt;New Reservation&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;f:form variable=&amp;quot;new_reservation&amp;quot; class=&amp;quot;RESERVATION&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
	&amp;lt;tr&amp;gt;&lt;br /&gt;
		&amp;lt;td&amp;gt;Name&amp;lt;/td&amp;gt;&lt;br /&gt;
		&amp;lt;td&amp;gt;&amp;lt;f:input_text value=&amp;quot;name&amp;quot; name=&amp;quot;a_name&amp;quot; text=&amp;quot;#{new_reservation.name}&amp;quot; /&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
	&amp;lt;/tr&amp;gt;&lt;br /&gt;
	&amp;lt;tr&amp;gt;&lt;br /&gt;
		&amp;lt;td&amp;gt;Date&amp;lt;/td&amp;gt;&lt;br /&gt;
		&amp;lt;td&amp;gt;&amp;lt;f:input_text value=&amp;quot;date&amp;quot; name=&amp;quot;a_date&amp;quot; text=&amp;quot;#{new_reservation.date}&amp;quot; /&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
	&amp;lt;/tr&amp;gt;&lt;br /&gt;
	&amp;lt;tr&amp;gt;&lt;br /&gt;
		&amp;lt;td colspan=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;f:button value=&amp;quot;Save&amp;quot; action=&amp;quot;save&amp;quot; type=&amp;quot;submit&amp;quot; /&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
		&amp;lt;/td&amp;gt;&lt;br /&gt;
	&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/f:form&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;/div&gt;</summary>
		<author><name>Sandrod</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=Xebra_Taglib_Form&amp;diff=13530</id>
		<title>Xebra Taglib Form</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=Xebra_Taglib_Form&amp;diff=13530"/>
				<updated>2009-11-24T14:05:53Z</updated>
		
		<summary type="html">&lt;p&gt;Sandrod: /* Form */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Xebra]]&lt;br /&gt;
[[Xebra About|About]] | [[Xebra Installation|Installation]] |  [[Xebra Documentation|Documentation]] |  [[Xebra Tutorial|Tutorials]] | [[Xebra FAQ|Frequently Asked Questions]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The Form Tag Library captures all the functionality related to html forms. This includes automatic wrapping of input to objects and validation.&lt;br /&gt;
&lt;br /&gt;
===Form===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Tag&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;f:form class=&amp;quot;...&amp;quot; variable=&amp;quot;...&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/f:form&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
All form tags have to be contained in a f-form. A variable and class can be optionally defined to automatically wrap input forms to an object. This variable is known in the scope of the form. Note that forms cannot be nested, as in normal xhtml forms.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;f:button text=&amp;quot;...&amp;quot; action=&amp;quot;...&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
A button is a normal html button. It is associated with a controller function (&amp;quot;action&amp;quot;) which is executed if the validation of all inputs field where successful. The automatically wrapped object is then passed to the action. The text designates the Label on the button.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;f:input_text value=&amp;quot;...&amp;quot; name=&amp;quot;...&amp;quot; text=&amp;quot;...&amp;quot; type=&amp;quot;...&amp;quot; label=&amp;quot;...&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
The designated normal html inputs. Additionally they provide a name which makes them identifiable for validation output. f-validator tags can be added to the inputs to define validators as in all wrappable inputs. The type argument is optional and defines the type of the input (for instance 'secret').&lt;br /&gt;
The optional 'label' attribute adds a label to the input.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;f:text_area value=&amp;quot;...&amp;quot; name=&amp;quot;...&amp;quot; text=&amp;quot;...&amp;quot; rows=&amp;quot;...&amp;quot; cols=&amp;quot;...&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
Basically the same as the input fields but with some additional auxiliary textarea-specific attributes (rows, cols).&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;f:drop_down_list items=&amp;quot;...&amp;quot; name=&amp;quot;...&amp;quot; value=&amp;quot;...&amp;quot; [label=&amp;quot;...&amp;quot;]/&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
This tag generates the equivalent to a &amp;lt;xml&amp;gt;&amp;lt;select&amp;gt;&amp;lt;option&amp;gt;...&amp;lt;/option&amp;gt;...&amp;lt;/select&amp;gt;&amp;lt;/xml&amp;gt; statement. items designates the list to be used in the drop down and type is an optional parameter. It defines the type of the items. If not set, it assumes Strings.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;f:check_box name=&amp;quot;...&amp;quot; label=&amp;quot;..&amp;quot; value=&amp;quot;...&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
A normal checkbox which is automatically wrapped to a boolean.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;f:command_link text=&amp;quot;...&amp;quot; action=&amp;quot;...&amp;quot; variable=&amp;quot;...&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
A command link is a html link. It acts though like a button and executes the defined action on the controller. If a variable is defined, it will be passed to the action (feature). Variable names can be used from f-form or xeb-iterate.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;f:validator class=&amp;quot;...&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
A validator validates an input. It can be added to input fields (or textareas) to check the input.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;f:validation_result name=&amp;quot;...&amp;quot; variable=&amp;quot;...&amp;quot;&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/f:validation_result&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
Stores a variable with the name of the variable attribute. It contains the error message. If there is more than one error it iterates over all errors. In this way formatting of errors is (almost) free to the designer.&lt;br /&gt;
|}&lt;br /&gt;
====Example====&lt;br /&gt;
For the forms framework we will use a simple display of reservations with an input mask and delete command links.&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
	&amp;lt;tr&amp;gt;&lt;br /&gt;
		&amp;lt;td&amp;gt;Name&amp;lt;/td&amp;gt;&lt;br /&gt;
		&amp;lt;td&amp;gt;Date&amp;lt;/td&amp;gt;&lt;br /&gt;
		&amp;lt;td&amp;gt;Persons&amp;lt;/td&amp;gt;&lt;br /&gt;
		&amp;lt;xeb:container render=&amp;quot;authenticated_admin&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;td&amp;gt;Delete&amp;lt;/td&amp;gt;&lt;br /&gt;
		&amp;lt;/xeb:container&amp;gt;&lt;br /&gt;
		&amp;lt;xeb:container render=&amp;quot;not_authenticated_admin&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;td&amp;gt;Details&amp;lt;/td&amp;gt;&lt;br /&gt;
		&amp;lt;/xeb:container&amp;gt;&lt;br /&gt;
	&amp;lt;/tr&amp;gt;&lt;br /&gt;
	&amp;lt;f:form&amp;gt;&lt;br /&gt;
	&amp;lt;xeb:iterate list=&amp;quot;global_state.db.reservations&amp;quot; variable=&amp;quot;reservation&amp;quot; type=&amp;quot;RESERVATION&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;tr&amp;gt;&lt;br /&gt;
			&amp;lt;td&amp;gt;&amp;lt;xeb:display feature=&amp;quot;#{reservation.name}&amp;quot;/&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
			&amp;lt;td&amp;gt;&amp;lt;xeb:display feature=&amp;quot;#{reservation.date}&amp;quot;/&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
			&amp;lt;td&amp;gt;&lt;br /&gt;
			&amp;lt;f:command_link label=&amp;quot;Delete&amp;quot; action=&amp;quot;delete&amp;quot; variable=&amp;quot;reservation&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;/td&amp;gt;					&lt;br /&gt;
		&amp;lt;/tr&amp;gt;&lt;br /&gt;
	&amp;lt;/xeb:iterate&amp;gt;&lt;br /&gt;
	&amp;lt;/f:form&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;h2&amp;gt;New Reservation&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;f:form variable=&amp;quot;new_reservation&amp;quot; class=&amp;quot;RESERVATION&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
	&amp;lt;tr&amp;gt;&lt;br /&gt;
		&amp;lt;td&amp;gt;Name&amp;lt;/td&amp;gt;&lt;br /&gt;
		&amp;lt;td&amp;gt;&amp;lt;f:input_text value=&amp;quot;name&amp;quot; name=&amp;quot;a_name&amp;quot; text=&amp;quot;#{new_reservation.name}&amp;quot; /&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
	&amp;lt;/tr&amp;gt;&lt;br /&gt;
	&amp;lt;tr&amp;gt;&lt;br /&gt;
		&amp;lt;td&amp;gt;Date&amp;lt;/td&amp;gt;&lt;br /&gt;
		&amp;lt;td&amp;gt;&amp;lt;f:input_text value=&amp;quot;date&amp;quot; name=&amp;quot;a_date&amp;quot; text=&amp;quot;#{new_reservation.date}&amp;quot; /&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
	&amp;lt;/tr&amp;gt;&lt;br /&gt;
	&amp;lt;tr&amp;gt;&lt;br /&gt;
		&amp;lt;td colspan=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;f:button value=&amp;quot;Save&amp;quot; action=&amp;quot;save&amp;quot; type=&amp;quot;submit&amp;quot; /&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
		&amp;lt;/td&amp;gt;&lt;br /&gt;
	&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/f:form&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;/div&gt;</summary>
		<author><name>Sandrod</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=Xebra_Taglib_Form&amp;diff=13523</id>
		<title>Xebra Taglib Form</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=Xebra_Taglib_Form&amp;diff=13523"/>
				<updated>2009-11-19T12:11:23Z</updated>
		
		<summary type="html">&lt;p&gt;Sandrod: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Xebra]]&lt;br /&gt;
[[Xebra About|About]] | [[Xebra Installation|Installation]] |  [[Xebra Documentation|Documentation]] |  [[Xebra Tutorial|Tutorials]] | [[Xebra FAQ|Frequently Asked Questions]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The Form Tag Library captures all the functionality related to html forms. This includes automatic wrapping of input to objects and validation.&lt;br /&gt;
&lt;br /&gt;
===Form===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Tag&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;f:form class=&amp;quot;...&amp;quot; variable=&amp;quot;...&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/f:form&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
All form tags have to be contained in a f-form. A variable and class can be optionally defined to automatically wrap input forms to an object. This variable is known in the scope of the form. Note that forms cannot be nested, as in normal xhtml forms.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;f:button text=&amp;quot;...&amp;quot; action=&amp;quot;...&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
A button is a normal html button. It is associated with a controller function (&amp;quot;action&amp;quot;) which is executed if the validation of all inputs field where successful. The automatically wrapped object is then passed to the action. The text designates the Label on the button.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;f:input_text value=&amp;quot;...&amp;quot; name=&amp;quot;...&amp;quot; text=&amp;quot;...&amp;quot; type=&amp;quot;...&amp;quot; label=&amp;quot;...&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
The designated normal html inputs. Additionally they provide a name which makes them identifiable for validation output. f-validator tags can be added to the inputs to define validators as in all wrappable inputs. The type argument is optional and defines the type of the input (for instance 'secret').&lt;br /&gt;
The optional 'label' attribute adds a label to the input.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;f:textarea value=&amp;quot;...&amp;quot; name=&amp;quot;...&amp;quot; text=&amp;quot;...&amp;quot; rows=&amp;quot;...&amp;quot; cols=&amp;quot;...&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
Basically the same as the input fields but with some additional auxiliary textarea-specific attributes (rows, cols).&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;f:drop_down_list items=&amp;quot;...&amp;quot; name=&amp;quot;...&amp;quot; value=&amp;quot;...&amp;quot; [label=&amp;quot;...&amp;quot;]/&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
This tag generates the equivalent to a &amp;lt;xml&amp;gt;&amp;lt;select&amp;gt;&amp;lt;option&amp;gt;...&amp;lt;/option&amp;gt;...&amp;lt;/select&amp;gt;&amp;lt;/xml&amp;gt; statement. items designates the list to be used in the drop down and type is an optional parameter. It defines the type of the items. If not set, it assumes Strings.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;f:check_box name=&amp;quot;...&amp;quot; label=&amp;quot;..&amp;quot; value=&amp;quot;...&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
A normal checkbox which is automatically wrapped to a boolean.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;f:command_link text=&amp;quot;...&amp;quot; action=&amp;quot;...&amp;quot; variable=&amp;quot;...&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
A command link is a html link. It acts though like a button and executes the defined action on the controller. If a variable is defined, it will be passed to the action (feature). Variable names can be used from f-form or xeb-iterate.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;f:validator class=&amp;quot;...&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
A validator validates an input. It can be added to input fields (or textareas) to check the input.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;f:validation_result name=&amp;quot;...&amp;quot; variable=&amp;quot;...&amp;quot;&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/f:validation_result&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
Stores a variable with the name of the variable attribute. It contains the error message. If there is more than one error it iterates over all errors. In this way formatting of errors is (almost) free to the designer.&lt;br /&gt;
|}&lt;br /&gt;
====Example====&lt;br /&gt;
For the forms framework we will use a simple display of reservations with an input mask and delete command links.&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
	&amp;lt;tr&amp;gt;&lt;br /&gt;
		&amp;lt;td&amp;gt;Name&amp;lt;/td&amp;gt;&lt;br /&gt;
		&amp;lt;td&amp;gt;Date&amp;lt;/td&amp;gt;&lt;br /&gt;
		&amp;lt;td&amp;gt;Persons&amp;lt;/td&amp;gt;&lt;br /&gt;
		&amp;lt;xeb:container render=&amp;quot;authenticated_admin&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;td&amp;gt;Delete&amp;lt;/td&amp;gt;&lt;br /&gt;
		&amp;lt;/xeb:container&amp;gt;&lt;br /&gt;
		&amp;lt;xeb:container render=&amp;quot;not_authenticated_admin&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;td&amp;gt;Details&amp;lt;/td&amp;gt;&lt;br /&gt;
		&amp;lt;/xeb:container&amp;gt;&lt;br /&gt;
	&amp;lt;/tr&amp;gt;&lt;br /&gt;
	&amp;lt;f:form&amp;gt;&lt;br /&gt;
	&amp;lt;xeb:iterate list=&amp;quot;global_state.db.reservations&amp;quot; variable=&amp;quot;reservation&amp;quot; type=&amp;quot;RESERVATION&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;tr&amp;gt;&lt;br /&gt;
			&amp;lt;td&amp;gt;&amp;lt;xeb:display feature=&amp;quot;#{reservation.name}&amp;quot;/&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
			&amp;lt;td&amp;gt;&amp;lt;xeb:display feature=&amp;quot;#{reservation.date}&amp;quot;/&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
			&amp;lt;td&amp;gt;&lt;br /&gt;
			&amp;lt;f:command_link label=&amp;quot;Delete&amp;quot; action=&amp;quot;delete&amp;quot; variable=&amp;quot;reservation&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;/td&amp;gt;					&lt;br /&gt;
		&amp;lt;/tr&amp;gt;&lt;br /&gt;
	&amp;lt;/xeb:iterate&amp;gt;&lt;br /&gt;
	&amp;lt;/f:form&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;h2&amp;gt;New Reservation&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;f:form variable=&amp;quot;new_reservation&amp;quot; class=&amp;quot;RESERVATION&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
	&amp;lt;tr&amp;gt;&lt;br /&gt;
		&amp;lt;td&amp;gt;Name&amp;lt;/td&amp;gt;&lt;br /&gt;
		&amp;lt;td&amp;gt;&amp;lt;f:input_text value=&amp;quot;name&amp;quot; name=&amp;quot;a_name&amp;quot; text=&amp;quot;#{new_reservation.name}&amp;quot; /&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
	&amp;lt;/tr&amp;gt;&lt;br /&gt;
	&amp;lt;tr&amp;gt;&lt;br /&gt;
		&amp;lt;td&amp;gt;Date&amp;lt;/td&amp;gt;&lt;br /&gt;
		&amp;lt;td&amp;gt;&amp;lt;f:input_text value=&amp;quot;date&amp;quot; name=&amp;quot;a_date&amp;quot; text=&amp;quot;#{new_reservation.date}&amp;quot; /&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
	&amp;lt;/tr&amp;gt;&lt;br /&gt;
	&amp;lt;tr&amp;gt;&lt;br /&gt;
		&amp;lt;td colspan=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;f:button value=&amp;quot;Save&amp;quot; action=&amp;quot;save&amp;quot; type=&amp;quot;submit&amp;quot; /&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
		&amp;lt;/td&amp;gt;&lt;br /&gt;
	&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/f:form&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;/div&gt;</summary>
		<author><name>Sandrod</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=Xebra_Installation&amp;diff=13495</id>
		<title>Xebra Installation</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=Xebra_Installation&amp;diff=13495"/>
				<updated>2009-10-07T19:12:12Z</updated>
		
		<summary type="html">&lt;p&gt;Sandrod: /* Ubuntu Installation Script */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Xebra]]&lt;br /&gt;
[[Xebra About|About]] | [[Xebra Installation|Installation]] |  [[Xebra Documentation|Documentation]] |  [[Xebra Tutorial|Tutorials]] | [[Xebra FAQ|Frequently Asked Questions]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Installations=&lt;br /&gt;
===There are two ways to install Xebra:===&lt;br /&gt;
*Automatic&lt;br /&gt;
** A script for Ubuntu 9.04 that sets up xebra and also installs apache&lt;br /&gt;
** A Windows Installer that contains xebra and apache and sets it up&lt;br /&gt;
*Manual (Step-by-step guide)&lt;br /&gt;
** Ubuntu 9.04 with Apache&lt;br /&gt;
** Windows with Apache&lt;br /&gt;
** Windows with IIS7&lt;br /&gt;
&lt;br /&gt;
===A few notes===&lt;br /&gt;
*All of xebra is compiled with the -experiment option. We haven't tested to compile anything in non-experimental mode.&lt;br /&gt;
*Currently (rev 80407), for all types of installation you have to adapt a files in ISE_LIBRARY to make it work since there is a bug in the eiffel argument parser library: In the class ''ISE_EIFFEL/experimental/library/argument_parser/parsers/argument_base_parser.e'' in the feature ''arguments: ARRAY [STRING]'' replace the line &lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
create Result.make (1, l_result.count)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
with&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
create Result.make_filled (&amp;quot;&amp;quot;, 1, l_result.count)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Ubuntu Installation Script =&lt;br /&gt;
{{Note| This script was tested with Xebra revision 81047, EiffelStudio 6.5.8.945 and Ubuntu 9.04 (October 2009)}}&lt;br /&gt;
&lt;br /&gt;
Download this script (the current revision):&lt;br /&gt;
https://svn.eiffel.com/eiffelstudio/trunk/Src/framework/web/xebra/tools/scripts/linux/install_xebra_ubuntu.sh&lt;br /&gt;
Change the revision constant in the top to 81047 and then run the script.&lt;br /&gt;
&lt;br /&gt;
The script expects $XEBRA_DEV, $ISE_EIFFEL and $ISE_LIBRARY to be set. Please make sure ''svn'', ''wget'', ''vim'' and ''tar'' are installed. Also, the path to your eiffel studio bin folder should be included in your PATH variable.&lt;br /&gt;
&lt;br /&gt;
The script will checkout xebra to $XEBRA_DEV, compile the server and translator, download, install and configure apache to $XEBRA_DEV/apache. Apache will be configured to listen on port 55000 (instead of 80) in order to not interfere with an already installed http server. After the script was successfully run you need to set $XEBRA_LIBRARY to $XEBRA_DEV/library. &lt;br /&gt;
&lt;br /&gt;
To test you installation run&lt;br /&gt;
 $XEBRA_DEV/bin/launch_apache.sh&lt;br /&gt;
 $XEBRA_DEV/bin/launch_server.sh&lt;br /&gt;
and then browse to&lt;br /&gt;
 http://localhost:55000/helloworld&lt;br /&gt;
The server will then start compiling the xebra precompile library and generate the helloworld webapp. It can take a while to do so the first time (If you want to see what's happening type 'debug_level 6' in the server console). While compiling you will see a page saying &amp;quot;Application 'helloworld' is compiling...&amp;quot;. After a while hit F5 and you should see &amp;quot;Hello WORLD!&amp;quot; (or &amp;quot;Hello world!&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
=Windows Installer =&lt;br /&gt;
{{Note| This installer was tested with Xebra revision 80545, EiffelStudio 6.5.8.294, on Windows XP SP2}}&lt;br /&gt;
&lt;br /&gt;
Run the installer at:&lt;br /&gt;
&lt;br /&gt;
https://svn.origo.ethz.ch/eiffelstudio/trunk/Src/framework/web/xebra/tools/installer/win/innosetup/output/XebraSetup.exe&lt;br /&gt;
&lt;br /&gt;
To test your installation click &amp;quot;Launch Xebra Full&amp;quot; in the &amp;quot;Eiffel Xebra&amp;quot; folder in your start menu. This will launch apache and the xebra server and it will open &amp;quot;localhost:55000/helloworld&amp;quot; in your browser. &lt;br /&gt;
The server will then start compiling the xebra precompile library and generate the helloworld webapp. It can take a while to do so the first time (If you want to see what's happening type 'debug_level 6' in the server console). While compiling you will see a page saying &amp;quot;Application 'helloworld' is compiling...&amp;quot;. After a while hit F5 and you should see &amp;quot;Hello WORLD!&amp;quot; (or &amp;quot;Hello world!&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
=Manual Installation=&lt;br /&gt;
This guide expects Eiffel Studio to be installed to $ISE_EIFFEL and the source to be checked out to $EIFFEL_SRC (only the folder 'framework' is needed).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Checkout Xebra==&lt;br /&gt;
* Define $XEBRA_DEV and checkout xebra from https://svn.eiffel.com/eiffelstudio/trunk/Src/framework/web/xebra/ to $XEBRA_DEV&lt;br /&gt;
* Define $XEBRA_LIBRARY to $XEBRA_DEV/eiffel_projects/library&lt;br /&gt;
&lt;br /&gt;
==Install HTTP Server==&lt;br /&gt;
=== Ubuntu 9.04 with Apache 2.2.11 ===&lt;br /&gt;
Note:&lt;br /&gt;
* Mod_xebra does currently not run with the apache distribution that comes with ubuntu. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Download apache unix source from http://httpd.apache.org/download.cgi&lt;br /&gt;
* Extract&lt;br /&gt;
* Define $APACHE2 where you want to install apache, e.g. to $XEBRA_DEV/apache&lt;br /&gt;
* Run the following commands in the extracted folder:&lt;br /&gt;
 CFLAGS=&amp;quot;-ggdb&amp;quot;&lt;br /&gt;
 ./configure --prefix=$APACHE2&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
* Compile the module by running&lt;br /&gt;
 cd $XEBRA_DEV/c_projects/apache_mod_xebra&lt;br /&gt;
 $APACHE2/bin/apxs -c mod_xebra.c mod_xebra.h&lt;br /&gt;
* Install the module to apache by running&lt;br /&gt;
 $APACHE2/bin/apxs -i mod_xebra.la&lt;br /&gt;
* Add the following lines to $APACHE2/conf/httpd.conf:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
#Xebra Module&lt;br /&gt;
LoadModule xebra_module modules/mod_xebra.so&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;IfModule xebra_module&amp;gt;&lt;br /&gt;
  AddHandler mod_xebra .xeb&lt;br /&gt;
  AddHandler mod_xebra .xrpc&lt;br /&gt;
  XebraServer_port 55001&lt;br /&gt;
  XebraServer_host &amp;quot;127.0.0.1&amp;quot;&lt;br /&gt;
  XebraServer_max_upload_size 10000000&lt;br /&gt;
  XebraServer_upload_path &amp;quot;/tmp&amp;quot;&lt;br /&gt;
  DirectoryIndex index.xeb&lt;br /&gt;
 &amp;lt;Files ~ &amp;quot;\.(ini|e|ecf)$&amp;quot;&amp;gt;&lt;br /&gt;
  Order allow,deny&lt;br /&gt;
  Deny from all&lt;br /&gt;
 &amp;lt;/Files&amp;gt;&lt;br /&gt;
 &amp;lt;Directory ~ &amp;quot;EIFGENs&amp;quot;&amp;gt;&lt;br /&gt;
  Order allow,deny&lt;br /&gt;
  Deny from all&lt;br /&gt;
 &amp;lt;/Directory&amp;gt;&lt;br /&gt;
&amp;lt;/IfModule&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
* Also in httpd.conf, change ''DocumentRoot'' to ''{path to xebra}\www'' and don't forget the directory options below the line ''# This should be changed to whatever you set DocumentRoot to.''&lt;br /&gt;
* Create the directory ''/tmp'' or choose another temp upload directory.&lt;br /&gt;
* Restart apache&lt;br /&gt;
 $APACHE2/bin/apachectl restart&lt;br /&gt;
* Browse to ''http://localhost/test.xeb''. You should see a message saying ''Cannot connect to XebraServer. See apache error log.''&lt;br /&gt;
* Hint: keep an eye on the apache error log &lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
tail -f $APACHE2/logs/error_log&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Windows with Apache 2.2.11===&lt;br /&gt;
&lt;br /&gt;
Note&lt;br /&gt;
* If mod_xebra.so was compiled with VS2008, it has a delay-load dependency on the Visual C++ 9.0 debug runtime library, msvcr90d.dll.  This dll comes with Visual Studio 2008 C++ including the free Visual Studio 2008 C++ Express edition.  This file can be copied in to the System32 directory.  If this DLL is not found you will get an Apache error '''Cannot load C:/Xebra/httpd/modules/mod_xebra.so into server: This application has failed to start because the application configuration is incorrect.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Download apache windows binary from http://httpd.apache.org/download.cgi&lt;br /&gt;
* Install (Choose Custom Installation and install Build Headers and Libraries as well)&lt;br /&gt;
* Copy $XEBRA_DEV/c_projects/apache_mod_xebra/mod_xebra.so to your Apache2.2\modules folder.&lt;br /&gt;
**Note: If you use a newer version of apache than 2.2.11 please compile mod_xebra yourself to avoid any possible errors, see [[Xebra Apache Module Windows]].&lt;br /&gt;
* Add the following lines to Apache2.2\conf\httpd.conf:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
#Xebra Module&lt;br /&gt;
LoadModule xebra_module modules/mod_xebra.so&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;IfModule xebra_module&amp;gt;&lt;br /&gt;
  AddHandler mod_xebra .xeb&lt;br /&gt;
  AddHandler mod_xebra .xrpc&lt;br /&gt;
  XebraServer_port 55001&lt;br /&gt;
  XebraServer_host &amp;quot;127.0.0.1&amp;quot;&lt;br /&gt;
  XebraServer_max_upload_size 10000000&lt;br /&gt;
  XebraServer_upload_path &amp;quot;c:\tmp&amp;quot;&lt;br /&gt;
  DirectoryIndex index.xeb&lt;br /&gt;
 &amp;lt;Files ~ &amp;quot;\.(ini|e|ecf)$&amp;quot;&amp;gt;&lt;br /&gt;
  Order allow,deny&lt;br /&gt;
  Deny from all&lt;br /&gt;
 &amp;lt;/Files&amp;gt;&lt;br /&gt;
 &amp;lt;Directory ~ &amp;quot;EIFGENs&amp;quot;&amp;gt;&lt;br /&gt;
  Order allow,deny&lt;br /&gt;
  Deny from all&lt;br /&gt;
 &amp;lt;/Directory&amp;gt;&lt;br /&gt;
&amp;lt;/IfModule&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
* Also in httpd.conf, change ''DocumentRoot'' to ''{path to xebra}\www'' and don't forget the directory options below the line ''# This should be changed to whatever you set DocumentRoot to.''&lt;br /&gt;
* Create the directory ''c:\tmp'' or choose another temp upload directory.&lt;br /&gt;
* Restart Apache&lt;br /&gt;
* Browse to ''http://localhost/test.xeb''. You should see the a message saying ''Cannot connect to XebraServer. See apache error log.''&lt;br /&gt;
&lt;br /&gt;
===Windows with IIS7===&lt;br /&gt;
&lt;br /&gt;
* Open %XEBRA_DEV%\c_projects\iis_xebra_handler\XebraEventSourceInstaller\XebraEventSourceInstaller.sln in VS2008&lt;br /&gt;
* Compile and run (This will install the ''XebraHandler'' source to the Windows Event Log. This cannot be performed by the handler because it lacks permissions.)&lt;br /&gt;
* (Optional) Open %XEBRA_DEV%\c_projects\iis_xebra_handler\Xebra.sln in VS2008 and compile&lt;br /&gt;
* Create a new site in IIS and point it to %XEBRA_DEV%\www&lt;br /&gt;
* Copy %XEBRA_DEV%\c_projects\iis_xebra_handler\website\web.config to %XEBRA_DEV%\www&lt;br /&gt;
* Copy %XEBRA_DEV%\c_projects\iis_xebra_handler\website\bin to %XEBRA_DEV%\www&lt;br /&gt;
&lt;br /&gt;
=== Mac OS X with Apache ===&lt;br /&gt;
Note:&lt;br /&gt;
* If you're using the version of EiffelStudio from MacPorts, environment variables must be set within the startup script.  /Applications/MacPorts/Eiffel64/EiffelStudio/Contents/Resources/EiffelLauncher&lt;br /&gt;
* Save yourself a ton of hassle and just sudo chmod -R 777 * both the $ISE_EIFFEL and $EIFFEL_SRC directories.&lt;br /&gt;
&lt;br /&gt;
* Get Apache V2 from Mac Ports&lt;br /&gt;
  sudo port install apache2&lt;br /&gt;
* Copy $XEBRA_DEV/www/* to /opt/local/apache2/htdocs&lt;br /&gt;
* Compile the module by running&lt;br /&gt;
 cd $XEBRA_DEV/c_projects/apache_mod_xebra&lt;br /&gt;
 sudo /opt/local/apache2/bin/apxs -c -Wc,-ggdb -I$ISE_EIFFEL/studio/spec/$ISE_PLATFORM/include mod_xebra.c mod_xebra.h&lt;br /&gt;
* Install the module to apache by running&lt;br /&gt;
 sudo /opt/local/apache2/bin/apxs -i mod_xebra.la&lt;br /&gt;
* Prepare to edit the protected httpd.conf file by running the command:&lt;br /&gt;
  sudo /Applications/TextEdit.app/Contents/MacOS/TextEdit&lt;br /&gt;
  Within TextEdit, which now is running under sudo, open /opt/local/apache2/conf/httpd.conf&lt;br /&gt;
* Add the following lines to /opt/local/apache2/conf/httpd.conf:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
#Xebra Module&lt;br /&gt;
LoadModule xebra_module modules/mod_xebra.so&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;IfModule xebra_module&amp;gt;&lt;br /&gt;
  AddHandler mod_xebra .xeb&lt;br /&gt;
  AddHandler mod_xebra .xrpc&lt;br /&gt;
  XebraServer_port 55001&lt;br /&gt;
  XebraServer_host &amp;quot;127.0.0.1&amp;quot;&lt;br /&gt;
  XebraServer_max_upload_size 10000000&lt;br /&gt;
  XebraServer_upload_path &amp;quot;/tmp&amp;quot;&lt;br /&gt;
  DirectoryIndex index.xeb&lt;br /&gt;
 &amp;lt;Files ~ &amp;quot;\.(ini|e|ecf)$&amp;quot;&amp;gt;&lt;br /&gt;
  Order allow,deny&lt;br /&gt;
  Deny from all&lt;br /&gt;
 &amp;lt;/Files&amp;gt;&lt;br /&gt;
 &amp;lt;Directory ~ &amp;quot;EIFGENs&amp;quot;&amp;gt;&lt;br /&gt;
  Order allow,deny&lt;br /&gt;
  Deny from all&lt;br /&gt;
 &amp;lt;/Directory&amp;gt;&lt;br /&gt;
&amp;lt;/IfModule&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
* Also in httpd.conf, change ''DocumentRoot'' to ''{path to xebra}\www'' and don't forget the directory options below the line ''# This should be changed to whatever you set DocumentRoot to.''&lt;br /&gt;
* Create the directory /tmp or choose another temp upload directory.&lt;br /&gt;
* The default MacPorts apache install will listen on port 80&lt;br /&gt;
* Restart apache &lt;br /&gt;
 sudo /opt/local/apache2/bin/apachectl restart&lt;br /&gt;
* Browse to http://localhost/test.xeb. You should see a message saying &amp;quot;Cannot connect to XebraServer. See apache error log.&amp;quot;&lt;br /&gt;
* Hint: keep an eye on the apache error log &lt;br /&gt;
 tail -f $APACHE2/logs/error_log&lt;br /&gt;
&lt;br /&gt;
==Compile the Translator and Server ==&lt;br /&gt;
* First we need to compile the xebra precompile library:&lt;br /&gt;
&lt;br /&gt;
'''Linux'''&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
ec -experiment -config $XEBRA_DEV/eiffel_projects/library/xebra_precompile/xebra_precompile.ecf -target xebra_precompile -c_compile -clean -precompile -project_path $XEBRA_DEV/eiffel_projects/library/xebra_precompile&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
'''Windows'''&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
ec -experiment -config %XEBRA_DEV%\eiffel_projects\library\xebra_precompile\xebra_precompile.ecf -target xebra_precompile -c_compile -clean -precompile -project_path %XEBRA_DEV%\eiffel_projects\library\xebra_precompile&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Then run:&lt;br /&gt;
&lt;br /&gt;
'''Linux'''&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
ec -experiment -config $XEBRA_DEV/eiffel_projects/xebra_translator/xebra_translator.ecf -target xebra_translator -c_compile -clean -finalize -project_path $XEBRA_DEV/eiffel_projects/xebra_translator&lt;br /&gt;
&lt;br /&gt;
ec -experiment -config $XEBRA_DEV/eiffel_projects/xebra_server/xebra_server.ecf -target xebra_server -c_compile -clean -finalize -project_path $XEBRA_DEV/eiffel_projects/xebra_server&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
'''Windows'''&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
ec -experiment -config %XEBRA_DEV%\eiffel_projects\xebra_translator\xebra_translator.ecf -target xebra_translator -c_compile -clean -finalize -project_path %XEBRA_DEV%\eiffel_projects\xebra_translator&lt;br /&gt;
&lt;br /&gt;
ec -experiment -config %XEBRA_DEV%\eiffel_projects\xebra_server\xebra_server.ecf -target xebra_server -c_compile -clean -finalize -project_path %XEBRA_DEV%\eiffel_projects\xebra_server&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Test the installation==&lt;br /&gt;
&lt;br /&gt;
To test you installation run&lt;br /&gt;
&lt;br /&gt;
'''Windows'''&lt;br /&gt;
 %XEBRA_DEV%\apache\bin\httpd.exe&lt;br /&gt;
 %XEBRA_DEV%\eiffel_projects\xebra_server\EIFGENs\xebra_server\F_code\xebra_server.exe %XEBRA_DEV%\eiffel_projects\xebra_server\config.srv -d 6&lt;br /&gt;
&lt;br /&gt;
'''Linux'''&lt;br /&gt;
 $XEBRA_DEV/apache/bin/httpd&lt;br /&gt;
 $XEBRA_DEV/eiffel_projects/xebra_server/EIFGENs/xebra_server/F_code/xebra_server $XEBRA_DEV/eiffel_projects/xebra_server/config.srv -d 6&lt;br /&gt;
&lt;br /&gt;
and then open&lt;br /&gt;
 http://localhost/helloworld&lt;br /&gt;
in your web browser.&lt;br /&gt;
&lt;br /&gt;
The server will then start compiling the xebra precompile library and generate the helloworld webapp. It can take a minute to do so the first time. While compiling you will see a page saying &amp;quot;Application 'helloworld' is compiling...&amp;quot;. After a while hit F5 and you should see &amp;quot;Hello WORLD!&amp;quot; (or &amp;quot;Hello world!&amp;quot;).&lt;/div&gt;</summary>
		<author><name>Sandrod</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=Xebra_Issues&amp;diff=13431</id>
		<title>Xebra Issues</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=Xebra_Issues&amp;diff=13431"/>
				<updated>2009-09-01T17:32:38Z</updated>
		
		<summary type="html">&lt;p&gt;Sandrod: /* Other */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Xebra]]&lt;br /&gt;
[[Xebra About|About]] | [[Xebra Installation|Installation]] |  [[Xebra Documentation|Documentation]] |  [[Xebra Tutorial|Tutorials]] | [[Xebra FAQ|Frequently Asked Questions]]&lt;br /&gt;
&lt;br /&gt;
The following list represents the improvements which should be implemented in further releases but which are yet missing.&lt;br /&gt;
&lt;br /&gt;
=== Xebra Translator ===&lt;br /&gt;
&lt;br /&gt;
*  Allow parameters for calls in xeb files. As for now it is only possible to use predefined variables (multiple allowed). The new implementation would allow manifest strings, integers and all the other primitive types to be added. For this purpose the grammar has to be modified and probably some model classes.&lt;br /&gt;
* Make sure that all the variable names used don't conflict with other names (unless the user used them twice).&lt;br /&gt;
* Allow injected #{} and %=% into attributes, replacing the functionality of xeb:concat. In a bigger step the grammar for attributes could be expanded to allow Eiffel expressions.&lt;br /&gt;
* Establish common names and change tags accordingly if they don't conform. An example is 'type' which should be used instead of 'class'.&lt;br /&gt;
* Multi-threaded translation&lt;br /&gt;
* Add an alternative concatenation besides xeb:concat which automatically declares the variable used without the need of xeb:set_variable.&lt;br /&gt;
&lt;br /&gt;
=== Xebra Server ===&lt;br /&gt;
* Implement multithreaded request processing&lt;br /&gt;
&lt;br /&gt;
=== Webapps ===&lt;br /&gt;
* The problem with uploading certain files seems to persist&lt;br /&gt;
* Allow in .wapp relative path for the ecf&lt;br /&gt;
* Implement multithreaded request processing&lt;br /&gt;
&lt;br /&gt;
=== HTTP Server Plugins ===&lt;br /&gt;
&lt;br /&gt;
* Automatically launch xebra server&lt;br /&gt;
&lt;br /&gt;
=== Other ===&lt;br /&gt;
* Fix memory leak in socket.accept on timeout (DEVELOPER_EXCEPTION)&lt;br /&gt;
* Implement i18n support&lt;br /&gt;
* Implement caching&lt;br /&gt;
* Add support for Unicode&lt;br /&gt;
* Implement file download&lt;/div&gt;</summary>
		<author><name>Sandrod</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=Xebra_Issues&amp;diff=13427</id>
		<title>Xebra Issues</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=Xebra_Issues&amp;diff=13427"/>
				<updated>2009-09-01T17:01:12Z</updated>
		
		<summary type="html">&lt;p&gt;Sandrod: /* Xebra Translator */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Xebra]]&lt;br /&gt;
[[Xebra About|About]] | [[Xebra Installation|Installation]] |  [[Xebra Documentation|Documentation]] |  [[Xebra Tutorial|Tutorials]] | [[Xebra FAQ|Frequently Asked Questions]]&lt;br /&gt;
&lt;br /&gt;
The following list represents the improvements which should be implemented in further releases but which are yet missing.&lt;br /&gt;
&lt;br /&gt;
=== Xebra Translator ===&lt;br /&gt;
&lt;br /&gt;
*  Allow parameters for calls in xeb files. As for now it is only possible to use predefined variables (multiple allowed). The new implementation would allow manifest strings, integers and all the other primitive types to be added. For this purpose the grammar has to be modified and probably some model classes.&lt;br /&gt;
* Make sure that all the variable names used don't conflict with other names (unless the user used them twice).&lt;br /&gt;
* Allow injected #{} and %=% into attributes, replacing the functionality of xeb:concat. In a bigger step the grammar for attributes could be expanded to allow Eiffel expressions.&lt;br /&gt;
* Establish common names and change tags accordingly if they don't conform. An example is 'type' which should be used instead of 'class'.&lt;br /&gt;
* Multi-threaded translation&lt;br /&gt;
* Add an alternative concatenation besides xeb:concat which automatically declares the variable used without the need of xeb:set_variable.&lt;br /&gt;
&lt;br /&gt;
=== Xebra Server ===&lt;br /&gt;
* Implement multithreaded request processing&lt;br /&gt;
&lt;br /&gt;
=== Webapps ===&lt;br /&gt;
* The problem with uploading certain files seems to persist&lt;br /&gt;
* Allow in .wapp relative path for the ecf&lt;br /&gt;
* Implement multithreaded request processing&lt;br /&gt;
&lt;br /&gt;
=== HTTP Server Plugins ===&lt;br /&gt;
&lt;br /&gt;
* Automatically launch xebra server&lt;br /&gt;
&lt;br /&gt;
=== Other ===&lt;br /&gt;
* Fix memory leak in socket.accept on timeout (DEVELOPER_EXCEPTION)&lt;br /&gt;
* Implement i18n support&lt;br /&gt;
* Implement caching&lt;br /&gt;
* Add support for unicode&lt;/div&gt;</summary>
		<author><name>Sandrod</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=Xebra_Create_Tag_Library&amp;diff=13426</id>
		<title>Xebra Create Tag Library</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=Xebra_Create_Tag_Library&amp;diff=13426"/>
				<updated>2009-09-01T16:56:08Z</updated>
		
		<summary type="html">&lt;p&gt;Sandrod: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Xebra]]&lt;br /&gt;
[[Xebra About|About]] | [[Xebra Installation|Installation]] |  [[Xebra Documentation|Documentation]] |  [[Xebra Tutorial|Tutorials]] | [[Xebra FAQ|Frequently Asked Questions]]&lt;br /&gt;
&lt;br /&gt;
This tutorial shows you how you can create a tag library for your own needs. It makes sense to add a custom library if some functionality recurs in your project(s). We will create a simple tag library (&amp;quot;font&amp;quot;) with a tag with the ability to format text as bold (bold).&lt;br /&gt;
&lt;br /&gt;
=Setting up=&lt;br /&gt;
Every tag library needs a unique namespace (like ''xeb'' or ''page''). We create a folder in $FONT_TAG_LIBRARY where we put all our configuration and tag library files.&lt;br /&gt;
The API of our tag library is defined in a file called config.taglib and has to be located in $FONT_TAG_LIBRARY. Since we don't have any tags yet, the file will just contain a skeleton:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;taglib id=&amp;quot;font&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/taglib&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With this configuration we created a tag library with the namespace &amp;quot;font&amp;quot; and no tags.&lt;br /&gt;
Since tag libraries are used as libraries we need to add a font_tag_library.ecf in the same folder as well:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;ISO-8859-1&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;system xmlns=&amp;quot;http://www.eiffel.com/developers/xml/configuration-1-5-0&amp;quot; xmlns:xsi=&amp;quot;http://www.w3.org/2001/XMLSchema-instance&amp;quot; xsi:schemaLocation=&amp;quot;http://www.eiffel.com/developers/xml/configuration-1-5-0 http://www.eiffel.com/developers/xml/configuration-1-5-0.xsd&amp;quot; name=&amp;quot;font_tag_library&amp;quot; uuid=&amp;quot;491B4344-79AF-43CB-891B-47EDEAC11056&amp;quot; library_target=&amp;quot;font_tag_library&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;target name=&amp;quot;font_tag_library&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;root all_classes=&amp;quot;true&amp;quot;/&amp;gt;&lt;br /&gt;
		&amp;lt;option full_class_checking=&amp;quot;true&amp;quot; syntax=&amp;quot;transitional&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;assertions precondition=&amp;quot;true&amp;quot; postcondition=&amp;quot;true&amp;quot; check=&amp;quot;true&amp;quot; invariant=&amp;quot;true&amp;quot; loop=&amp;quot;true&amp;quot; supplier_precondition=&amp;quot;true&amp;quot;/&amp;gt;&lt;br /&gt;
		&amp;lt;/option&amp;gt;&lt;br /&gt;
		&amp;lt;library name=&amp;quot;base&amp;quot; location=&amp;quot;$ISE_LIBRARY\library\base\base.ecf&amp;quot;/&amp;gt;&lt;br /&gt;
		&amp;lt;library name=&amp;quot;xebra_ast_elements&amp;quot; location=&amp;quot;$XEBRA_DEV\eiffel_projects\library\xebra_ast_elements\xebra_ast_elements-voidunsafe.ecf&amp;quot;/&amp;gt;&lt;br /&gt;
		&amp;lt;library name=&amp;quot;xebra_tags&amp;quot; location=&amp;quot;$XEBRA_DEV\eiffel_projects\library\xebra_tags\xebra_tags-voidunsafe.ecf&amp;quot;/&amp;gt;&lt;br /&gt;
		&amp;lt;library name=&amp;quot;xebra_utilities&amp;quot; location=&amp;quot;$XEBRA_DEV\eiffel_projects\library\xebra_utilities\xebra_utilities-voidunsafe.ecf&amp;quot;/&amp;gt;&lt;br /&gt;
		&amp;lt;cluster name=&amp;quot;font_tag_library&amp;quot; location=&amp;quot;.\&amp;quot; recursive=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;file_rule&amp;gt;&lt;br /&gt;
				&amp;lt;exclude&amp;gt;/EIFGENs$&amp;lt;/exclude&amp;gt;&lt;br /&gt;
				&amp;lt;exclude&amp;gt;/.svn$&amp;lt;/exclude&amp;gt;&lt;br /&gt;
				&amp;lt;exclude&amp;gt;/CVS$&amp;lt;/exclude&amp;gt;&lt;br /&gt;
			&amp;lt;/file_rule&amp;gt;&lt;br /&gt;
		&amp;lt;/cluster&amp;gt;&lt;br /&gt;
	&amp;lt;/target&amp;gt;&lt;br /&gt;
&amp;lt;/system&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Adding Tags=&lt;br /&gt;
To add our boldifying tag we need to add it to the config.taglib on the one hand and implement an eiffel class representing it on the other.&lt;br /&gt;
The config.taglib looks like this now:&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;taglib id=&amp;quot;xeb&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;tag id=&amp;quot;bold&amp;quot; class=&amp;quot;FONT_BOLD_TAG&amp;quot;&amp;gt;		&lt;br /&gt;
        &amp;lt;attribute id=&amp;quot;text&amp;quot; optional=&amp;quot;True&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/tag&amp;gt;&lt;br /&gt;
&amp;lt;/taglib&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
Note that we added a argument to the tag: ''text''. It is defined to be optional, so there is a default value for it. The corresponding class is defined with ''class'', in this case ''FONT_BOLD_TAG''.&lt;br /&gt;
The latter has to inherit from XTAG_TAG_SERIALIZER and implement a few features. In our example:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
class&lt;br /&gt;
	FONT_BOLD_TAG&lt;br /&gt;
&lt;br /&gt;
inherit&lt;br /&gt;
	XTAG_TAG_SERIALIZER&lt;br /&gt;
		redefine&lt;br /&gt;
			generates_render&lt;br /&gt;
		end&lt;br /&gt;
&lt;br /&gt;
create&lt;br /&gt;
	make&lt;br /&gt;
&lt;br /&gt;
feature -- Initialization&lt;br /&gt;
&lt;br /&gt;
	make&lt;br /&gt;
			--&lt;br /&gt;
		do&lt;br /&gt;
			make_base&lt;br /&gt;
			create {XTAG_TAG_VALUE_ARGUMENT} text.make (&amp;quot;default_text&amp;quot;)&lt;br /&gt;
		end&lt;br /&gt;
&lt;br /&gt;
feature -- Access&lt;br /&gt;
&lt;br /&gt;
	text: XTAG_TAG_ARGUMENT&lt;br /&gt;
			-- The text which should be displayed bold&lt;br /&gt;
&lt;br /&gt;
feature -- Implementation&lt;br /&gt;
&lt;br /&gt;
	internal_generate (a_servlet_class: XEL_SERVLET_CLASS_ELEMENT; a_variable_table: HASH_TABLE [ANY, STRING])&lt;br /&gt;
			-- &amp;lt;Precursor&amp;gt;&lt;br /&gt;
		do&lt;br /&gt;
			a_servlet_class.render_html_page.&lt;br /&gt;
				append_output_expression &lt;br /&gt;
					(&amp;quot;&amp;lt;b&amp;gt;%&amp;quot;&amp;quot; + text.value (current_controller_id) + &amp;quot;%&amp;quot;&amp;lt;/b&amp;gt;&amp;quot;)&lt;br /&gt;
		end&lt;br /&gt;
&lt;br /&gt;
	internal_put_attribute (a_id: STRING; a_attribute: XTAG_TAG_ARGUMENT)&lt;br /&gt;
			-- &amp;lt;Precursor&amp;gt;&lt;br /&gt;
		do&lt;br /&gt;
			if id.is_equal (&amp;quot;text&amp;quot;) then&lt;br /&gt;
				text := a_attribute&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
&lt;br /&gt;
	generates_render: BOOLEAN = True&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
For our tag we needed to implement the two features ''internal_generate'' and ''internal_put_attribute''. The former has the task to generate all code in the servlet. In our case this is a print on the HTML result. The latter - ''internal_put_attribute'' - handles attributes of the tag. Here we just read the value and save it into ''text'' for further reuse in the rendering.&lt;br /&gt;
Finally we redefined ''generates_render''. This tells the generator that the tag creates expressions in the render feature. This feature redefinition is not needed, but will add debug information in the generated servlet file.&lt;/div&gt;</summary>
		<author><name>Sandrod</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=Xebra_Issues&amp;diff=13420</id>
		<title>Xebra Issues</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=Xebra_Issues&amp;diff=13420"/>
				<updated>2009-09-01T16:11:43Z</updated>
		
		<summary type="html">&lt;p&gt;Sandrod: /* Xebra Translator */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Xebra]]&lt;br /&gt;
[[Xebra About|About]] | [[Xebra Installation|Installation]] |  [[Xebra Documentation|Documentation]] |  [[Xebra Tutorial|Tutorials]] | [[Xebra FAQ|Frequently Asked Questions]]&lt;br /&gt;
&lt;br /&gt;
The following list represents the improvements which should be implemented in further releases but which are yet missing.&lt;br /&gt;
&lt;br /&gt;
=== Xebra Translator ===&lt;br /&gt;
&lt;br /&gt;
*  Allow parameters for calls in xeb files. As for now it is only possible to use predefined variables (multiple allowed). The new implementation would allow manifest strings, integers and all the other primitive types to be added. For this purpose the grammar has to be modified and probably some model classes.&lt;br /&gt;
* Make sure that all the variable names used don't conflict with other names (unless the user used them twice).&lt;br /&gt;
* Allow injected #{} and %=% into attributes, replacing the functionality of xeb:concat. In a bigger step the grammar for attributes could be expanded to allow Eiffel expressions.&lt;br /&gt;
* Establish common names and change tags accordingly if they don't conform. An example is 'type' which should be used instead of 'class'.&lt;br /&gt;
* Multi-threaded translation&lt;br /&gt;
&lt;br /&gt;
=== Xebra Server ===&lt;br /&gt;
* Implement multithreaded request processing&lt;br /&gt;
&lt;br /&gt;
=== Webapps ===&lt;br /&gt;
* Implement multithreaded request processing&lt;br /&gt;
&lt;br /&gt;
=== HTTP Server Plugins ===&lt;br /&gt;
&lt;br /&gt;
=== Other ===&lt;br /&gt;
* Fix memory leak in socket.accept&lt;br /&gt;
* Implement i18n support&lt;br /&gt;
* Implement chaching&lt;br /&gt;
* Add support for unicode&lt;/div&gt;</summary>
		<author><name>Sandrod</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=Xebra_Issues&amp;diff=13415</id>
		<title>Xebra Issues</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=Xebra_Issues&amp;diff=13415"/>
				<updated>2009-09-01T16:09:33Z</updated>
		
		<summary type="html">&lt;p&gt;Sandrod: /* Other */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Xebra]]&lt;br /&gt;
[[Xebra About|About]] | [[Xebra Installation|Installation]] |  [[Xebra Documentation|Documentation]] |  [[Xebra Tutorial|Tutorials]] | [[Xebra FAQ|Frequently Asked Questions]]&lt;br /&gt;
&lt;br /&gt;
The following list represents the improvements which should be implemented in further releases but which are yet missing.&lt;br /&gt;
&lt;br /&gt;
=== Xebra Translator ===&lt;br /&gt;
&lt;br /&gt;
#  Allow parameters for calls in xeb files. As for now it is only possible to use predefined variables (multiple allowed). The new implementation would allow manifest strings, integers and all the other primitive types to be added. For this purpose the grammar has to be modified and probably some model classes.&lt;br /&gt;
# Make sure that all the variable names used don't conflict with other names (unless the user used them twice).&lt;br /&gt;
# Allow injected #{} and %=% into attributes, replacing the functionality of xeb:concat. In a bigger step the grammar for attributes could be expanded to allow Eiffel expressions.&lt;br /&gt;
# Establish common names and change tags accordingly if they don't conform. An example is 'type' which should be used instead of 'class'.&lt;br /&gt;
# Multi-threaded translation&lt;br /&gt;
&lt;br /&gt;
=== Xebra Server ===&lt;br /&gt;
* Multithreaded request processing&lt;br /&gt;
&lt;br /&gt;
=== Webapps ===&lt;br /&gt;
* Multithreaded request processing&lt;br /&gt;
&lt;br /&gt;
=== Other ===&lt;br /&gt;
* Fix memory leak in socket.accept&lt;br /&gt;
* I18n support&lt;br /&gt;
* Chaching&lt;br /&gt;
* Unicode&lt;/div&gt;</summary>
		<author><name>Sandrod</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=Xebra_Issues&amp;diff=13412</id>
		<title>Xebra Issues</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=Xebra_Issues&amp;diff=13412"/>
				<updated>2009-09-01T16:08:22Z</updated>
		
		<summary type="html">&lt;p&gt;Sandrod: /* Xebra Translator */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Xebra]]&lt;br /&gt;
[[Xebra About|About]] | [[Xebra Installation|Installation]] |  [[Xebra Documentation|Documentation]] |  [[Xebra Tutorial|Tutorials]] | [[Xebra FAQ|Frequently Asked Questions]]&lt;br /&gt;
&lt;br /&gt;
The following list represents the improvements which should be implemented in further releases but which are yet missing.&lt;br /&gt;
&lt;br /&gt;
=== Xebra Translator ===&lt;br /&gt;
&lt;br /&gt;
#  Allow parameters for calls in xeb files. As for now it is only possible to use predefined variables (multiple allowed). The new implementation would allow manifest strings, integers and all the other primitive types to be added. For this purpose the grammar has to be modified and probably some model classes.&lt;br /&gt;
# Make sure that all the variable names used don't conflict with other names (unless the user used them twice).&lt;br /&gt;
# Allow injected #{} and %=% into attributes, replacing the functionality of xeb:concat. In a bigger step the grammar for attributes could be expanded to allow Eiffel expressions.&lt;br /&gt;
# Establish common names and change tags accordingly if they don't conform. An example is 'type' which should be used instead of 'class'.&lt;br /&gt;
# Multi-threaded translation&lt;br /&gt;
&lt;br /&gt;
=== Xebra Server ===&lt;br /&gt;
* Multithreaded request processing&lt;br /&gt;
&lt;br /&gt;
=== Webapps ===&lt;br /&gt;
* Multithreaded request processing&lt;br /&gt;
&lt;br /&gt;
=== Other ===&lt;br /&gt;
* I18n support&lt;br /&gt;
* Chaching&lt;/div&gt;</summary>
		<author><name>Sandrod</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=Xebra_Taglib_Xeb&amp;diff=13409</id>
		<title>Xebra Taglib Xeb</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=Xebra_Taglib_Xeb&amp;diff=13409"/>
				<updated>2009-09-01T16:05:29Z</updated>
		
		<summary type="html">&lt;p&gt;Sandrod: /* Xeb */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Xebra]]&lt;br /&gt;
[[Xebra About|About]] | [[Xebra Installation|Installation]] |  [[Xebra Documentation|Documentation]] |  [[Xebra Tutorial|Tutorials]] | [[Xebra FAQ|Frequently Asked Questions]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The Xebra Tag Library is a container for the more mundane, simple tags which are used almost everywhere. They include loops, calls to the controller and other basic functionality.&lt;br /&gt;
&lt;br /&gt;
===Xeb===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Tag&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;xeb:call feature=&amp;quot;...&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
Calls the feature on the controller on render-time.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;xeb:loop times=&amp;quot;...&amp;quot; variable=&amp;quot;...&amp;quot; &amp;gt;&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/xeb:loop&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
Loops its content &amp;quot;times&amp;quot; times. The optional 'variable' defines a local which contains the current index of the loop.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;xeb:redirect url=&amp;quot;...&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
Redirects the server to a new page at &amp;quot;url&amp;quot;. The redirect is done server internally.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;xeb:iterate list=&amp;quot;...&amp;quot; variable=&amp;quot;...&amp;quot; type=&amp;quot;...&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/xeb:iterate&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
Iterates over a list (defined with &amp;quot;list&amp;quot; as a controller call). The current item is stored in &amp;quot;variable&amp;quot; which is of type &amp;quot;type&amp;quot;.  This variable is known in the scope of the iterate tag.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;xeb:container&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/xeb:container&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
This simple tag just groups parts of the site. Can be used to conditionally render some parts with the &amp;quot;render&amp;quot; attribute.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;xeb:display text=&amp;quot;...&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
The display tag simply displays what is written in text (which can of course be dynamic content).&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Sandrod</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=Xebra_Taglib_Page&amp;diff=13406</id>
		<title>Xebra Taglib Page</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=Xebra_Taglib_Page&amp;diff=13406"/>
				<updated>2009-09-01T16:02:19Z</updated>
		
		<summary type="html">&lt;p&gt;Sandrod: /* Page */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Xebra]]&lt;br /&gt;
[[Xebra About|About]] | [[Xebra Installation|Installation]] |  [[Xebra Documentation|Documentation]] |  [[Xebra Tutorial|Tutorials]] | [[Xebra FAQ|Frequently Asked Questions]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Page===&lt;br /&gt;
The ''page'' libraries consists of the core tags needed for page configuration and composition. The Tags are:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Tag&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;page:controller class=&amp;quot;...&amp;quot; create=&amp;quot;...&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
Defines the controller which should be used for the ''xeb'' page. The optional 'create' attribute defines the name of the creation procedure. 'default_create' is used by default.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;page:declare_region id=&amp;quot;...&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
Declares a region at the specific point in the ''xeb'' page where including pages can add specific html code.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;page:define_region id=&amp;quot;...&amp;quot;&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/page:define_region&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
Can only be used inside a page-include tag. Will insert the content into the templates regions (with the same id). See page-include.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;page:include id=&amp;quot;...&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
Includes an other xeb page. If the included page has declare-region tags they have to be implemented with define-region tags.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;/page:fragment&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
If used the page is not transformed to a servlet. This tag shouldn't be necessary to use unless the page has to be temporary disabled.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Example====&lt;br /&gt;
&lt;br /&gt;
This example shows the workings of the template framework. It consists of a master page which acts as a template and three different types of usage of this template.&lt;br /&gt;
&lt;br /&gt;
'''master.xeb'''&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
&amp;lt;page:controller class=&amp;quot;DEFAULT_CONTROLLER&amp;quot; create=&amp;quot;make&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;body&amp;gt;&lt;br /&gt;
&amp;lt;h1&amp;gt;&lt;br /&gt;
&amp;lt;page:declare_region id=&amp;quot;greeting&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;page:declare_region id=&amp;quot;form&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/body&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The master page is &amp;quot;deferred&amp;quot;, since there are page:declare_region tags. The translator detects the undefined regions and doesn't generate a servlet from this xeb file. Note that we specified the creation procedure via 'create' as 'make' and therefore overwrote the default procedure 'default_create'.&lt;br /&gt;
&lt;br /&gt;
'''slave1.xeb'''&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;page:include template=&amp;quot;master&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;page:define_region id=&amp;quot;greeting&amp;quot;&amp;gt;&lt;br /&gt;
Hello, I'm Slave 1&lt;br /&gt;
&amp;lt;/page:define_region&amp;gt;&lt;br /&gt;
&amp;lt;page:define_region id=&amp;quot;form&amp;quot;&amp;gt;&lt;br /&gt;
Other region&lt;br /&gt;
&amp;lt;/page:define_region&amp;gt;&lt;br /&gt;
&amp;lt;/page:include&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
&lt;br /&gt;
slave1.xeb uses master.xeb as a template and includes it via the page-include tag. Since master.xeb declares two regions, slave1 defines them. The content of the define-region tags are inserted at the locations of the respective declare-region tags of the template. From this xeb file a servlet is generated.&lt;br /&gt;
Additionally since it's not declaring any controller all controller calls are redirected to the ones in the template.&lt;br /&gt;
&lt;br /&gt;
'''slave2.xeb'''&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;page:include template=&amp;quot;master&amp;quot;&lt;br /&gt;
&amp;lt;page:define_region id=&amp;quot;form&amp;quot;&amp;gt;&lt;br /&gt;
Other region 2&lt;br /&gt;
&amp;lt;/page:define_region&amp;gt;&lt;br /&gt;
&amp;lt;/page:include&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
Templates can also be just imported partially. In slave2.xeb just the &amp;quot;form&amp;quot;-part of the template is implemented. This means that slave2.xeb is itself a template and will not be translated to a servlet.&lt;br /&gt;
&lt;br /&gt;
slave3.xeb&lt;br /&gt;
&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;page:include template=&amp;quot;slave2.xeb&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;page:define_region id=&amp;quot;greetings&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/page:define_region&amp;gt;&lt;br /&gt;
&amp;lt;/page:include&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
This last example uses slave2.xeb as a template, which has one remaining region to implement: &amp;quot;greetings. The controller is still inherited from master.xeb, that is, controllers are transitive.&lt;br /&gt;
&lt;br /&gt;
With these techniques we would be able to minimize duplicated code and hence errors in the xeb files, which are difficult to debug.&lt;/div&gt;</summary>
		<author><name>Sandrod</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=Xebra_Taglib_Page&amp;diff=13405</id>
		<title>Xebra Taglib Page</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=Xebra_Taglib_Page&amp;diff=13405"/>
				<updated>2009-09-01T15:59:28Z</updated>
		
		<summary type="html">&lt;p&gt;Sandrod: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Xebra]]&lt;br /&gt;
[[Xebra About|About]] | [[Xebra Installation|Installation]] |  [[Xebra Documentation|Documentation]] |  [[Xebra Tutorial|Tutorials]] | [[Xebra FAQ|Frequently Asked Questions]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Page===&lt;br /&gt;
The ''page'' libraries consists of the core tags needed for page configuration and composition. The Tags are:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Tag&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;page:controller class=&amp;quot;...&amp;quot; create=&amp;quot;...&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
Defines the controller which should be used for the ''xeb'' page. The optional 'create' attribute defines the name of the creation procedure. 'default_create' is used by default.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;page:declare_region id=&amp;quot;...&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
Declares a region at the specific point in the ''xeb'' page where including pages can add specific html code.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;page:define_region id=&amp;quot;...&amp;quot;&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/page:define_region&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
Can only be used inside a page-include tag. Will insert the content into the templates regions (with the same id). See page-include.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;page:include id=&amp;quot;...&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
Includes an other xeb page. If the included page has declare-region tags they have to be implemented with define-region tags.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;/page:fragment&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
If used the page is not transformed to a servlet.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Example====&lt;br /&gt;
&lt;br /&gt;
This example shows the workings of the template framework. It consists of a master page which acts as a template and three different types of usage of this template.&lt;br /&gt;
&lt;br /&gt;
'''master.xeb'''&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
&amp;lt;page:controller class=&amp;quot;DEFAULT_CONTROLLER&amp;quot; create=&amp;quot;make&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;body&amp;gt;&lt;br /&gt;
&amp;lt;h1&amp;gt;&lt;br /&gt;
&amp;lt;page:declare_region id=&amp;quot;greeting&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;page:declare_region id=&amp;quot;form&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/body&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The master page is &amp;quot;deferred&amp;quot;, since there are page:declare_region tags. The translator detects the undefined regions and doesn't generate a servlet from this xeb file. Note that we specified the creation procedure via 'create' as 'make' and therefore overwrote the default procedure 'default_create'.&lt;br /&gt;
&lt;br /&gt;
'''slave1.xeb'''&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;page:include template=&amp;quot;master&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;page:define_region id=&amp;quot;greeting&amp;quot;&amp;gt;&lt;br /&gt;
Hello, I'm Slave 1&lt;br /&gt;
&amp;lt;/page:define_region&amp;gt;&lt;br /&gt;
&amp;lt;page:define_region id=&amp;quot;form&amp;quot;&amp;gt;&lt;br /&gt;
Other region&lt;br /&gt;
&amp;lt;/page:define_region&amp;gt;&lt;br /&gt;
&amp;lt;/page:include&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
&lt;br /&gt;
slave1.xeb uses master.xeb as a template and includes it via the page-include tag. Since master.xeb declares two regions, slave1 defines them. The content of the define-region tags are inserted at the locations of the respective declare-region tags of the template. From this xeb file a servlet is generated.&lt;br /&gt;
Additionally since it's not declaring any controller all controller calls are redirected to the ones in the template.&lt;br /&gt;
&lt;br /&gt;
'''slave2.xeb'''&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;page:include template=&amp;quot;master&amp;quot;&lt;br /&gt;
&amp;lt;page:define_region id=&amp;quot;form&amp;quot;&amp;gt;&lt;br /&gt;
Other region 2&lt;br /&gt;
&amp;lt;/page:define_region&amp;gt;&lt;br /&gt;
&amp;lt;/page:include&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
Templates can also be just imported partially. In slave2.xeb just the &amp;quot;form&amp;quot;-part of the template is implemented. This means that slave2.xeb is itself a template and will not be translated to a servlet.&lt;br /&gt;
&lt;br /&gt;
slave3.xeb&lt;br /&gt;
&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;page:include template=&amp;quot;slave2.xeb&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;page:define_region id=&amp;quot;greetings&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/page:define_region&amp;gt;&lt;br /&gt;
&amp;lt;/page:include&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
This last example uses slave2.xeb as a template, which has one remaining region to implement: &amp;quot;greetings. The controller is still inherited from master.xeb, that is, controllers are transitive.&lt;br /&gt;
&lt;br /&gt;
With these techniques we would be able to minimize duplicated code and hence errors in the xeb files, which are difficult to debug.&lt;/div&gt;</summary>
		<author><name>Sandrod</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=Xebra_Issues&amp;diff=13404</id>
		<title>Xebra Issues</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=Xebra_Issues&amp;diff=13404"/>
				<updated>2009-09-01T15:51:04Z</updated>
		
		<summary type="html">&lt;p&gt;Sandrod: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Xebra]]&lt;br /&gt;
[[Xebra About|About]] | [[Xebra Installation|Installation]] |  [[Xebra Documentation|Documentation]] |  [[Xebra Tutorial|Tutorials]] | [[Xebra FAQ|Frequently Asked Questions]]&lt;br /&gt;
&lt;br /&gt;
The following list represents the improvements which should be implemented in further releases but which are yet missing.&lt;br /&gt;
&lt;br /&gt;
=== Xebra Translator ===&lt;br /&gt;
&lt;br /&gt;
#  Allow parameters for calls in xeb files. As for now it is only possible to use predefined variables (multiple allowed). The new implementation would allow manifest strings, integers and all the other primitive types to be added. For this purpose the grammar has to be modified and probably some model classes.&lt;br /&gt;
# Make sure that all the variable names used don't conflict with other names (unless the user used them twice).&lt;br /&gt;
# Allow injected #{} and %=% into attributes, replacing the functionality of xeb:concat. In a bigger step the grammar for attributes could be expanded to allow Eiffel expressions.&lt;br /&gt;
# Establish common names and change tags accordingly if they don't conform. An example is 'type' which should be used instead of 'class'.&lt;br /&gt;
&lt;br /&gt;
=== Xebra Server ===&lt;br /&gt;
&lt;br /&gt;
=== Other ===&lt;/div&gt;</summary>
		<author><name>Sandrod</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=Xebra_Issues&amp;diff=13400</id>
		<title>Xebra Issues</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=Xebra_Issues&amp;diff=13400"/>
				<updated>2009-09-01T15:42:25Z</updated>
		
		<summary type="html">&lt;p&gt;Sandrod: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The following list represents the improvements which should be implemented in further releases but which are yet missing.&lt;br /&gt;
&lt;br /&gt;
=== Xebra Translator ===&lt;br /&gt;
&lt;br /&gt;
#  Allow parameters for calls in xeb files. As for now it is only possible to use predefined variables (multiple allowed). The new implementation would allow manifest strings, integers and all the other primitive types to be added. For this purpose the grammar has to be modified and probably some model classes.&lt;br /&gt;
# Make sure that all the variable names used don't conflict with other names (unless the user used them twice).&lt;br /&gt;
# Allow injected #{} and %=% into attributes, replacing the functionality of xeb:concat. In a bigger step the grammar for attributes could be expanded to allow Eiffel expressions.&lt;br /&gt;
# Establish common names and change tags accordingly if they don't conform. An example is 'type' which should be used instead of 'class'.&lt;br /&gt;
&lt;br /&gt;
=== Xebra Server ===&lt;br /&gt;
&lt;br /&gt;
=== Other ===&lt;/div&gt;</summary>
		<author><name>Sandrod</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=Xebra_Issues&amp;diff=13398</id>
		<title>Xebra Issues</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=Xebra_Issues&amp;diff=13398"/>
				<updated>2009-09-01T15:42:07Z</updated>
		
		<summary type="html">&lt;p&gt;Sandrod: New page: The following list represents the improvements which should be implemented in further releases but which are yet missing.  === Xebra Translator ===  #  Allow parameters for calls in xeb fi...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The following list represents the improvements which should be implemented in further releases but which are yet missing.&lt;br /&gt;
&lt;br /&gt;
=== Xebra Translator ===&lt;br /&gt;
&lt;br /&gt;
#  Allow parameters for calls in xeb files. As for now it is only possible to use predefined variables (multiple allowed). The new implementation would allow manifest strings, integers and all the other primitive types to be added. For this purpose the grammar has to be modified and probably some model classes.&lt;br /&gt;
# Make sure that all the variable names used don't conflict with other names (unless the user used them twice).&lt;br /&gt;
# Allow injected #{} and %=% into attributes, replacing the functionality of xeb:concat. In a bigger step the grammar for attributes could be expanded to allow Eiffel expressions.&lt;br /&gt;
# Establish common names and change tags accordingly if they don't conform. An example is 'type' which should be used instead of 'class'.&lt;/div&gt;</summary>
		<author><name>Sandrod</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=Xebra&amp;diff=13397</id>
		<title>Xebra</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=Xebra&amp;diff=13397"/>
				<updated>2009-09-01T15:40:28Z</updated>
		
		<summary type="html">&lt;p&gt;Sandrod: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Xebra]]&lt;br /&gt;
[[Image:Xebra_logo_head1.png|right]]&lt;br /&gt;
&lt;br /&gt;
* [[Xebra About|About]]&lt;br /&gt;
* [[Xebra Installation|Installation]]&lt;br /&gt;
* [[Xebra Documentation|Documentation]]&lt;br /&gt;
* [[Xebra Tutorial|Tutorials]]&lt;br /&gt;
* [[Xebra Issues|Todo]]&lt;br /&gt;
* [[Xebra FAQ|Frequently Asked Questions]]&lt;/div&gt;</summary>
		<author><name>Sandrod</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=Xebra_Create_Tag_Library&amp;diff=13386</id>
		<title>Xebra Create Tag Library</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=Xebra_Create_Tag_Library&amp;diff=13386"/>
				<updated>2009-08-31T21:44:14Z</updated>
		
		<summary type="html">&lt;p&gt;Sandrod: /* Adding Tags */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This tutorial shows you how you can create a tag library for your own needs. It makes sense to add a custom library if some functionality recurs in your project(s). We will create a simple tag library (&amp;quot;font&amp;quot;) with a tag with the ability to format text as bold (bold).&lt;br /&gt;
&lt;br /&gt;
=Setting up=&lt;br /&gt;
Every tag library needs a unique namespace (like ''xeb'' or ''page''). We create a folder in $FONT_TAG_LIBRARY where we put all our configuration and tag library files.&lt;br /&gt;
The API of our tag library is defined in a file called config.taglib and has to be located in $FONT_TAG_LIBRARY. Since we don't have any tags yet, the file will just contain a skeleton:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;taglib id=&amp;quot;font&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/taglib&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With this configuration we created a tag library with the namespace &amp;quot;font&amp;quot; and no tags.&lt;br /&gt;
Since tag libraries are used as libraries we need to add a font_tag_library.ecf in the same folder as well:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;ISO-8859-1&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;system xmlns=&amp;quot;http://www.eiffel.com/developers/xml/configuration-1-5-0&amp;quot; xmlns:xsi=&amp;quot;http://www.w3.org/2001/XMLSchema-instance&amp;quot; xsi:schemaLocation=&amp;quot;http://www.eiffel.com/developers/xml/configuration-1-5-0 http://www.eiffel.com/developers/xml/configuration-1-5-0.xsd&amp;quot; name=&amp;quot;font_tag_library&amp;quot; uuid=&amp;quot;491B4344-79AF-43CB-891B-47EDEAC11056&amp;quot; library_target=&amp;quot;font_tag_library&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;target name=&amp;quot;font_tag_library&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;root all_classes=&amp;quot;true&amp;quot;/&amp;gt;&lt;br /&gt;
		&amp;lt;option full_class_checking=&amp;quot;true&amp;quot; syntax=&amp;quot;transitional&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;assertions precondition=&amp;quot;true&amp;quot; postcondition=&amp;quot;true&amp;quot; check=&amp;quot;true&amp;quot; invariant=&amp;quot;true&amp;quot; loop=&amp;quot;true&amp;quot; supplier_precondition=&amp;quot;true&amp;quot;/&amp;gt;&lt;br /&gt;
		&amp;lt;/option&amp;gt;&lt;br /&gt;
		&amp;lt;library name=&amp;quot;base&amp;quot; location=&amp;quot;$ISE_LIBRARY\library\base\base.ecf&amp;quot;/&amp;gt;&lt;br /&gt;
		&amp;lt;library name=&amp;quot;xebra_ast_elements&amp;quot; location=&amp;quot;$XEBRA_DEV\eiffel_projects\library\xebra_ast_elements\xebra_ast_elements-voidunsafe.ecf&amp;quot;/&amp;gt;&lt;br /&gt;
		&amp;lt;library name=&amp;quot;xebra_tags&amp;quot; location=&amp;quot;$XEBRA_DEV\eiffel_projects\library\xebra_tags\xebra_tags-voidunsafe.ecf&amp;quot;/&amp;gt;&lt;br /&gt;
		&amp;lt;library name=&amp;quot;xebra_utilities&amp;quot; location=&amp;quot;$XEBRA_DEV\eiffel_projects\library\xebra_utilities\xebra_utilities-voidunsafe.ecf&amp;quot;/&amp;gt;&lt;br /&gt;
		&amp;lt;cluster name=&amp;quot;font_tag_library&amp;quot; location=&amp;quot;.\&amp;quot; recursive=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;file_rule&amp;gt;&lt;br /&gt;
				&amp;lt;exclude&amp;gt;/EIFGENs$&amp;lt;/exclude&amp;gt;&lt;br /&gt;
				&amp;lt;exclude&amp;gt;/.svn$&amp;lt;/exclude&amp;gt;&lt;br /&gt;
				&amp;lt;exclude&amp;gt;/CVS$&amp;lt;/exclude&amp;gt;&lt;br /&gt;
			&amp;lt;/file_rule&amp;gt;&lt;br /&gt;
		&amp;lt;/cluster&amp;gt;&lt;br /&gt;
	&amp;lt;/target&amp;gt;&lt;br /&gt;
&amp;lt;/system&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Adding Tags=&lt;br /&gt;
To add our boldifying tag we need to add it to the config.taglib on the one hand and implement an eiffel class representing it on the other.&lt;br /&gt;
The config.taglib looks like this now:&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;taglib id=&amp;quot;xeb&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;tag id=&amp;quot;bold&amp;quot; class=&amp;quot;FONT_BOLD_TAG&amp;quot;&amp;gt;		&lt;br /&gt;
        &amp;lt;attribute id=&amp;quot;text&amp;quot; optional=&amp;quot;True&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/tag&amp;gt;&lt;br /&gt;
&amp;lt;/taglib&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
Note that we added a argument to the tag: ''text''. It is defined to be optional, so there is a default value for it. The corresponding class is defined with ''class'', in this case ''FONT_BOLD_TAG''.&lt;br /&gt;
The latter has to inherit from XTAG_TAG_SERIALIZER and implement a few features. In our example:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
class&lt;br /&gt;
	FONT_BOLD_TAG&lt;br /&gt;
&lt;br /&gt;
inherit&lt;br /&gt;
	XTAG_TAG_SERIALIZER&lt;br /&gt;
		redefine&lt;br /&gt;
			generates_render&lt;br /&gt;
		end&lt;br /&gt;
&lt;br /&gt;
create&lt;br /&gt;
	make&lt;br /&gt;
&lt;br /&gt;
feature -- Initialization&lt;br /&gt;
&lt;br /&gt;
	make&lt;br /&gt;
			--&lt;br /&gt;
		do&lt;br /&gt;
			make_base&lt;br /&gt;
			create {XTAG_TAG_VALUE_ARGUMENT} text.make (&amp;quot;default_text&amp;quot;)&lt;br /&gt;
		end&lt;br /&gt;
&lt;br /&gt;
feature -- Access&lt;br /&gt;
&lt;br /&gt;
	text: XTAG_TAG_ARGUMENT&lt;br /&gt;
			-- The text which should be displayed bold&lt;br /&gt;
&lt;br /&gt;
feature -- Implementation&lt;br /&gt;
&lt;br /&gt;
	internal_generate (a_servlet_class: XEL_SERVLET_CLASS_ELEMENT; a_variable_table: HASH_TABLE [ANY, STRING])&lt;br /&gt;
			-- &amp;lt;Precursor&amp;gt;&lt;br /&gt;
		do&lt;br /&gt;
			a_servlet_class.render_html_page.&lt;br /&gt;
				append_output_expression &lt;br /&gt;
					(&amp;quot;&amp;lt;b&amp;gt;%&amp;quot;&amp;quot; + text.value (current_controller_id) + &amp;quot;%&amp;quot;&amp;lt;/b&amp;gt;&amp;quot;)&lt;br /&gt;
		end&lt;br /&gt;
&lt;br /&gt;
	internal_put_attribute (a_id: STRING; a_attribute: XTAG_TAG_ARGUMENT)&lt;br /&gt;
			-- &amp;lt;Precursor&amp;gt;&lt;br /&gt;
		do&lt;br /&gt;
			if id.is_equal (&amp;quot;text&amp;quot;) then&lt;br /&gt;
				text := a_attribute&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
&lt;br /&gt;
	generates_render: BOOLEAN = True&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
For our tag we needed to implement the two features ''internal_generate'' and ''internal_put_attribute''. The former has the task to generate all code in the servlet. In our case this is a print on the HTML result. The latter - ''internal_put_attribute'' - handles attributes of the tag. Here we just read the value and save it into ''text'' for further reuse in the rendering.&lt;br /&gt;
Finally we redefined ''generates_render''. This tells the generator that the tag creates expressions in the render feature. This feature redefinition is not needed, but will add debug information in the generated servlet file.&lt;/div&gt;</summary>
		<author><name>Sandrod</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=Xebra_Write_Xeb_File&amp;diff=13385</id>
		<title>Xebra Write Xeb File</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=Xebra_Write_Xeb_File&amp;diff=13385"/>
				<updated>2009-08-31T21:39:24Z</updated>
		
		<summary type="html">&lt;p&gt;Sandrod: /* Command Links */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Xebra]]&lt;br /&gt;
[[Xebra About|About]] | [[Xebra Installation|Installation]] |  [[Xebra Documentation|Documentation]] |  [[Xebra Tutorial|Tutorials]] | [[Xebra FAQ|Frequently Asked Questions]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Hello World=&lt;br /&gt;
&lt;br /&gt;
The simplest xeb file is a hello world example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
Hello World!&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This page will just display &amp;quot;Hello World!&amp;quot; as is.&lt;br /&gt;
&lt;br /&gt;
=Iteration over lists and display=&lt;br /&gt;
&lt;br /&gt;
If we have a list and want to iterate over it, we can simply use the iterate tag.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;xeb:iterate list=&amp;quot;persons&amp;quot; variable=&amp;quot;person&amp;quot; type=&amp;quot;PERSON&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;xeb:display feature=&amp;quot;#{person.name}&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/xeb&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notice the that the feature attribute is special. Attributes with &amp;quot;#{}&amp;quot; denote variable attributes and use defined variables (here the person from iterate).&lt;br /&gt;
&lt;br /&gt;
=Wrapped forms=&lt;br /&gt;
HTML forms have their managed counterpart in XEBRA. If we want to retrieve all the data from a form automatically, we can use the Form tag library (&amp;quot;f&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;f:form variable=&amp;quot;new_person&amp;quot; type=&amp;quot;PERSON&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;f:input_text value=&amp;quot;name&amp;quot; name=&amp;quot;a_name&amp;quot; text=&amp;quot;#{new_person.name}&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;f:button value=&amp;quot;Save&amp;quot; action=&amp;quot;save&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/f:form&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will generate a page with a form, a text field and a button. On a click on the button a new object of type PERSON is created and the name is set to the value in the text field.&lt;br /&gt;
Most of the time we want to validate inputs from forms. With validators we can check if an input is valid.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;f:form variable=&amp;quot;new_person&amp;quot; class=&amp;quot;PERSON&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;f:input_text value=&amp;quot;name&amp;quot; name=&amp;quot;a_name&amp;quot; text=&amp;quot;#{new_person.name}&amp;quot; &amp;gt;&lt;br /&gt;
&amp;lt;f:validator class=&amp;quot;NOT_EMPTY_VALIDATOR&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;f:validator class=&amp;quot;PERSON_NAME_VALIDATOR&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/f:input&amp;gt;&lt;br /&gt;
&amp;lt;f:validation_result name=&amp;quot;a_name&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;f:button value=&amp;quot;Save&amp;quot; action=&amp;quot;save&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/f:form&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To validate the input field we simply added two validators to the desired input field. Now if the validators report an invalid input the save action is not executed and errors messages are stored into a list. They can be displayed with a validation_result tag, by using the same identifier as the input_text (&amp;quot;a_name&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
=Command Links=&lt;br /&gt;
In Xebra actions can not only be assigned to buttons but to links as well. For instance it can be used to delete items from a list.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;xeb:iterate list=&amp;quot;persons&amp;quot; variable=&amp;quot;person&amp;quot; type=&amp;quot;PERSON&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;f:form&amp;gt;&lt;br /&gt;
&amp;lt;f:command_link label=&amp;quot;#{person.name}&amp;quot; action=&amp;quot;delete&amp;quot; variable=&amp;quot;person&amp;quot; /&amp;gt; &amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;/f:form&amp;gt;&lt;br /&gt;
&amp;lt;/xeb:iterate&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will result in a page with the list of all person's names as links. If you click the link the person will be deleted (via the delete feature of the controller specified with the action argument in the command_link tag).&lt;/div&gt;</summary>
		<author><name>Sandrod</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=Xebra_Write_Xeb_File&amp;diff=13384</id>
		<title>Xebra Write Xeb File</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=Xebra_Write_Xeb_File&amp;diff=13384"/>
				<updated>2009-08-31T21:36:51Z</updated>
		
		<summary type="html">&lt;p&gt;Sandrod: /* Wrapped forms */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Xebra]]&lt;br /&gt;
[[Xebra About|About]] | [[Xebra Installation|Installation]] |  [[Xebra Documentation|Documentation]] |  [[Xebra Tutorial|Tutorials]] | [[Xebra FAQ|Frequently Asked Questions]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Hello World=&lt;br /&gt;
&lt;br /&gt;
The simplest xeb file is a hello world example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
Hello World!&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This page will just display &amp;quot;Hello World!&amp;quot; as is.&lt;br /&gt;
&lt;br /&gt;
=Iteration over lists and display=&lt;br /&gt;
&lt;br /&gt;
If we have a list and want to iterate over it, we can simply use the iterate tag.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;xeb:iterate list=&amp;quot;persons&amp;quot; variable=&amp;quot;person&amp;quot; type=&amp;quot;PERSON&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;xeb:display feature=&amp;quot;#{person.name}&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/xeb&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notice the that the feature attribute is special. Attributes with &amp;quot;#{}&amp;quot; denote variable attributes and use defined variables (here the person from iterate).&lt;br /&gt;
&lt;br /&gt;
=Wrapped forms=&lt;br /&gt;
HTML forms have their managed counterpart in XEBRA. If we want to retrieve all the data from a form automatically, we can use the Form tag library (&amp;quot;f&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;f:form variable=&amp;quot;new_person&amp;quot; type=&amp;quot;PERSON&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;f:input_text value=&amp;quot;name&amp;quot; name=&amp;quot;a_name&amp;quot; text=&amp;quot;#{new_person.name}&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;f:button value=&amp;quot;Save&amp;quot; action=&amp;quot;save&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/f:form&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will generate a page with a form, a text field and a button. On a click on the button a new object of type PERSON is created and the name is set to the value in the text field.&lt;br /&gt;
Most of the time we want to validate inputs from forms. With validators we can check if an input is valid.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;f:form variable=&amp;quot;new_person&amp;quot; class=&amp;quot;PERSON&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;f:input_text value=&amp;quot;name&amp;quot; name=&amp;quot;a_name&amp;quot; text=&amp;quot;#{new_person.name}&amp;quot; &amp;gt;&lt;br /&gt;
&amp;lt;f:validator class=&amp;quot;NOT_EMPTY_VALIDATOR&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;f:validator class=&amp;quot;PERSON_NAME_VALIDATOR&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/f:input&amp;gt;&lt;br /&gt;
&amp;lt;f:validation_result name=&amp;quot;a_name&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;f:button value=&amp;quot;Save&amp;quot; action=&amp;quot;save&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/f:form&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To validate the input field we simply added two validators to the desired input field. Now if the validators report an invalid input the save action is not executed and errors messages are stored into a list. They can be displayed with a validation_result tag, by using the same identifier as the input_text (&amp;quot;a_name&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
=Command Links=&lt;br /&gt;
In Xebra actions can not only be assigned to buttons but to links as well. For instance it can be used to delete items from a list.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;xeb:iterate list=&amp;quot;persons&amp;quot; variable=&amp;quot;person&amp;quot; class=&amp;quot;PERSON&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;f:form&amp;gt;&lt;br /&gt;
&amp;lt;f:command_link label=&amp;quot;#{person.name}&amp;quot; action=&amp;quot;delete&amp;quot; variable=&amp;quot;person&amp;quot; /&amp;gt; &amp;lt;/ br&amp;gt;&lt;br /&gt;
&amp;lt;/f:form&amp;gt;&lt;br /&gt;
&amp;lt;/xeb:iterate&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will result in a page with the list of all person's names as links. If you click the link the person will be deleted (via the delete feature of the controller specified with the action argument in the command_link tag).&lt;/div&gt;</summary>
		<author><name>Sandrod</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=Xebra_Write_Xeb_File&amp;diff=13383</id>
		<title>Xebra Write Xeb File</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=Xebra_Write_Xeb_File&amp;diff=13383"/>
				<updated>2009-08-31T21:34:19Z</updated>
		
		<summary type="html">&lt;p&gt;Sandrod: /* Iteration over lists and display */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Xebra]]&lt;br /&gt;
[[Xebra About|About]] | [[Xebra Installation|Installation]] |  [[Xebra Documentation|Documentation]] |  [[Xebra Tutorial|Tutorials]] | [[Xebra FAQ|Frequently Asked Questions]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Hello World=&lt;br /&gt;
&lt;br /&gt;
The simplest xeb file is a hello world example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
Hello World!&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This page will just display &amp;quot;Hello World!&amp;quot; as is.&lt;br /&gt;
&lt;br /&gt;
=Iteration over lists and display=&lt;br /&gt;
&lt;br /&gt;
If we have a list and want to iterate over it, we can simply use the iterate tag.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;xeb:iterate list=&amp;quot;persons&amp;quot; variable=&amp;quot;person&amp;quot; type=&amp;quot;PERSON&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;xeb:display feature=&amp;quot;#{person.name}&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/xeb&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notice the that the feature attribute is special. Attributes with &amp;quot;#{}&amp;quot; denote variable attributes and use defined variables (here the person from iterate).&lt;br /&gt;
&lt;br /&gt;
=Wrapped forms=&lt;br /&gt;
HTML forms have their managed counterpart in XEBRA. If we want to retrieve all the data from a form automatically, we can use the Form tag library (&amp;quot;f&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;f:form variable=&amp;quot;new_person&amp;quot; class=&amp;quot;PERSON&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;f:input_text value=&amp;quot;name&amp;quot; name=&amp;quot;a_name&amp;quot; text=&amp;quot;#{new_person.name}&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;f:button value=&amp;quot;Save&amp;quot; action=&amp;quot;save&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/f:form&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will generate a page with a form, a text field and a button. On a click on the button a new object of type PERSON is created and the name is set to the value in the text field.&lt;br /&gt;
Most of the time we want to validate inputs from forms. With validators we can check if an input is valid.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;f:form variable=&amp;quot;new_person&amp;quot; class=&amp;quot;PERSON&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;f:input_text value=&amp;quot;name&amp;quot; name=&amp;quot;a_name&amp;quot; text=&amp;quot;#{new_person.name}&amp;quot; &amp;gt;&lt;br /&gt;
&amp;lt;f:validator class=&amp;quot;NOT_EMPTY_VALIDATOR&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;f:validator class=&amp;quot;PERSON_NAME_VALIDATOR&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/f:input&amp;gt;&lt;br /&gt;
&amp;lt;f:validation_result name=&amp;quot;a_name&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;f:button value=&amp;quot;Save&amp;quot; action=&amp;quot;save&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/f:form&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To validate the input field we simply added two validators to the desired input field. Now if the validators report an invalid input the save action is not executed and errors messages are stored into a list. They can be displayed with a validation_result tag, by using the same identifier as the input_text (&amp;quot;a_name&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
=Command Links=&lt;br /&gt;
In Xebra actions can not only be assigned to buttons but to links as well. For instance it can be used to delete items from a list.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;xeb:iterate list=&amp;quot;persons&amp;quot; variable=&amp;quot;person&amp;quot; class=&amp;quot;PERSON&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;f:form&amp;gt;&lt;br /&gt;
&amp;lt;f:command_link label=&amp;quot;#{person.name}&amp;quot; action=&amp;quot;delete&amp;quot; variable=&amp;quot;person&amp;quot; /&amp;gt; &amp;lt;/ br&amp;gt;&lt;br /&gt;
&amp;lt;/f:form&amp;gt;&lt;br /&gt;
&amp;lt;/xeb:iterate&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will result in a page with the list of all person's names as links. If you click the link the person will be deleted (via the delete feature of the controller specified with the action argument in the command_link tag).&lt;/div&gt;</summary>
		<author><name>Sandrod</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=Xebra_Documentation&amp;diff=13375</id>
		<title>Xebra Documentation</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=Xebra_Documentation&amp;diff=13375"/>
				<updated>2009-08-31T18:05:22Z</updated>
		
		<summary type="html">&lt;p&gt;Sandrod: /* Thread Utilities */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Xebra]]&lt;br /&gt;
[[Xebra About|About]] | [[Xebra Installation|Installation]] |  [[Xebra Documentation|Documentation]] |  [[Xebra Tutorial|Tutorials]] | [[Xebra FAQ|Frequently Asked Questions]]&lt;br /&gt;
&lt;br /&gt;
=Overview=&lt;br /&gt;
* [[Xebra Socket Communication]]&lt;br /&gt;
&lt;br /&gt;
=Xebra HTTP Server Plugins=&lt;br /&gt;
* [[Xebra Module Communication Protocol|Module Communication Protocol]]&lt;br /&gt;
* [[Xebra Module Content Types|Content Types]]&lt;br /&gt;
&lt;br /&gt;
==Mod_xebra for Apache==&lt;br /&gt;
* [[Xebra Apache Module Windows|Apache Module Windows]]&lt;br /&gt;
&lt;br /&gt;
=Xebra Server=&lt;br /&gt;
* [[Xebra Server Administration]]&lt;br /&gt;
&lt;br /&gt;
= Web Applications =&lt;br /&gt;
* [[Xebra Webapp Config File]]&lt;br /&gt;
&lt;br /&gt;
==Xebra Tag Libraries==&lt;br /&gt;
On the following pages you can find the descriptions of the different tags of the available tag libraries. &lt;br /&gt;
* [[Xebra Taglib Page|Page]]&lt;br /&gt;
* [[Xebra Taglib Xeb|Xeb]]&lt;br /&gt;
* [[Xebra Taglib Form|Form]]&lt;br /&gt;
* [[Xebra Taglib XRPC|XRPC]]&lt;br /&gt;
* [[Xebra Tag Attribute|Tag Attribute]]&lt;br /&gt;
&lt;br /&gt;
==Master pages==&lt;br /&gt;
* [[Xebra Master Pages|Templates with master pages]]&lt;br /&gt;
&lt;br /&gt;
==XML_RPC==&lt;br /&gt;
* [[Xebra XML_RPC]]&lt;br /&gt;
&lt;br /&gt;
=Code documentation=&lt;br /&gt;
==Xebra Libraries==&lt;br /&gt;
=== Error===&lt;br /&gt;
Provides internal error types for all xebra applications such as XERROR_CANNOT_OPEN_FILE or XERROR_SOCKET_NOT_BOUND. These errors are not supplied to the browser but only displayed in the log/console.&lt;br /&gt;
=== Common ===&lt;br /&gt;
&lt;br /&gt;
Xebra_common contains all commands, command responses and interfaces for commands that are used by the server and the webapps. Furthermore, it contains deferred classes for server modules and webapp config classes.&lt;br /&gt;
&lt;br /&gt;
=== Error Responses ===&lt;br /&gt;
Classes from xebra_error_responses are split into XER_SERVER: error responses generated by the server and XER_APP: error responses generated by the webapp. Both types are ultimately sent to the http server plugin and displayed in the user's browser. For instance XER_POST_TOO_BIG is a server error response that is created if the post request is bigger than allowed. XER_APP_CANNOT_FIND_PAGE is a response created by the webapp and then sent to the server if no servlet with the specified name was defined.&lt;br /&gt;
&lt;br /&gt;
=== Http ===&lt;br /&gt;
&lt;br /&gt;
Xebra_http provides classes for cookies, html requests, html responses, sessions and their parsers.&lt;br /&gt;
&lt;br /&gt;
=== Utilities ===&lt;br /&gt;
&lt;br /&gt;
Xebra_utilities is a collection of independent helper classes such as text escaper, file utilities, log outputter, stopwatch, string expander etc.&lt;br /&gt;
&lt;br /&gt;
=== Thread Utilities ===&lt;br /&gt;
An implementation of a [http://en.wikipedia.org/wiki/Thread_pool_pattern | Thread Pool]. There are two implementations: with or without data class reuse (DATA_THREAD_POOL and THREAD_POOL).&lt;br /&gt;
&lt;br /&gt;
=== AST Elements ===&lt;br /&gt;
This library contains various classes which model eiffel language constructs. It consists of classes, features, comments, locals and expressions. They can be combined to build an object model of an eiffel class. Convenience features are provided to add locals and variables with unique names.&lt;br /&gt;
AST Elements can be serialized to a text representation.&lt;br /&gt;
It also contains some specialized classes for Xebra.&lt;br /&gt;
&lt;br /&gt;
=== Taglibrary Base ===&lt;br /&gt;
The base tag library contains all the basic Xebra tag implementations like display, call and iterate. For a more detailed explanation of the tags see [[Xebra_Taglib_Xeb| the documentation]].&lt;br /&gt;
&lt;br /&gt;
=== Taglibrary Form ===&lt;br /&gt;
The form tag library contains all tag implementations for form related tags. Automatic wrapping of values, controls and validations are included in this library. For a more detailed explanation see [[Xebra_Taglib_Form|here]].&lt;br /&gt;
&lt;br /&gt;
=== Taglibrary XRPC ===&lt;br /&gt;
This tag library contains tags for XML-RPC applications. For further information see [[Xebra_Taglib_XRPC|here]].&lt;br /&gt;
&lt;br /&gt;
=== Tags ===&lt;br /&gt;
Contains all super classes used for xebra tags and xebra tag arguments. Also contains super classes for servlet generation (XGEN_SERVLET_GENERATOR).&lt;/div&gt;</summary>
		<author><name>Sandrod</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=Xebra_Documentation&amp;diff=13374</id>
		<title>Xebra Documentation</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=Xebra_Documentation&amp;diff=13374"/>
				<updated>2009-08-31T17:58:56Z</updated>
		
		<summary type="html">&lt;p&gt;Sandrod: /* Taglibrary XRPC */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Xebra]]&lt;br /&gt;
[[Xebra About|About]] | [[Xebra Installation|Installation]] |  [[Xebra Documentation|Documentation]] |  [[Xebra Tutorial|Tutorials]] | [[Xebra FAQ|Frequently Asked Questions]]&lt;br /&gt;
&lt;br /&gt;
=Overview=&lt;br /&gt;
* [[Xebra Socket Communication]]&lt;br /&gt;
&lt;br /&gt;
=Xebra HTTP Server Plugins=&lt;br /&gt;
* [[Xebra Module Communication Protocol|Module Communication Protocol]]&lt;br /&gt;
* [[Xebra Module Content Types|Content Types]]&lt;br /&gt;
&lt;br /&gt;
==Mod_xebra for Apache==&lt;br /&gt;
* [[Xebra Apache Module Windows|Apache Module Windows]]&lt;br /&gt;
&lt;br /&gt;
=Xebra Server=&lt;br /&gt;
* [[Xebra Server Administration]]&lt;br /&gt;
&lt;br /&gt;
= Web Applications =&lt;br /&gt;
* [[Xebra Webapp Config File]]&lt;br /&gt;
&lt;br /&gt;
==Xebra Tag Libraries==&lt;br /&gt;
On the following pages you can find the descriptions of the different tags of the available tag libraries. &lt;br /&gt;
* [[Xebra Taglib Page|Page]]&lt;br /&gt;
* [[Xebra Taglib Xeb|Xeb]]&lt;br /&gt;
* [[Xebra Taglib Form|Form]]&lt;br /&gt;
* [[Xebra Taglib XRPC|XRPC]]&lt;br /&gt;
* [[Xebra Tag Attribute|Tag Attribute]]&lt;br /&gt;
&lt;br /&gt;
==Master pages==&lt;br /&gt;
* [[Xebra Master Pages|Templates with master pages]]&lt;br /&gt;
&lt;br /&gt;
==XML_RPC==&lt;br /&gt;
* [[Xebra XML_RPC]]&lt;br /&gt;
&lt;br /&gt;
=Code documentation=&lt;br /&gt;
==Xebra Libraries==&lt;br /&gt;
=== Error===&lt;br /&gt;
Provides internal error types for all xebra applications such as XERROR_CANNOT_OPEN_FILE or XERROR_SOCKET_NOT_BOUND. These errors are not supplied to the browser but only displayed in the log/console.&lt;br /&gt;
=== Common ===&lt;br /&gt;
&lt;br /&gt;
Xebra_common contains all commands, command responses and interfaces for commands that are used by the server and the webapps. Furthermore, it contains deferred classes for server modules and webapp config classes.&lt;br /&gt;
&lt;br /&gt;
=== Error Responses ===&lt;br /&gt;
Classes from xebra_error_responses are split into XER_SERVER: error responses generated by the server and XER_APP: error responses generated by the webapp. Both types are ultimately sent to the http server plugin and displayed in the user's browser. For instance XER_POST_TOO_BIG is a server error response that is created if the post request is bigger than allowed. XER_APP_CANNOT_FIND_PAGE is a response created by the webapp and then sent to the server if no servlet with the specified name was defined.&lt;br /&gt;
&lt;br /&gt;
=== Http ===&lt;br /&gt;
&lt;br /&gt;
Xebra_http provides classes for cookies, html requests, html responses, sessions and their parsers.&lt;br /&gt;
&lt;br /&gt;
=== Utilities ===&lt;br /&gt;
&lt;br /&gt;
Xebra_utilities is a collection of independent helper classes such as text escaper, file utilities, log outputter, stopwatch, string expander etc.&lt;br /&gt;
&lt;br /&gt;
=== Thread Utilities ===&lt;br /&gt;
An implementation of a [http://en.wikipedia.org/wiki/Thread_pool_pattern| Thread Pool]. There are two implementations: with or without data class reuse (DATA_THREAD_POOL and THREAD_POOL).&lt;br /&gt;
&lt;br /&gt;
=== AST Elements ===&lt;br /&gt;
This library contains various classes which model eiffel language constructs. It consists of classes, features, comments, locals and expressions. They can be combined to build an object model of an eiffel class. Convenience features are provided to add locals and variables with unique names.&lt;br /&gt;
AST Elements can be serialized to a text representation.&lt;br /&gt;
It also contains some specialized classes for Xebra.&lt;br /&gt;
&lt;br /&gt;
=== Taglibrary Base ===&lt;br /&gt;
The base tag library contains all the basic Xebra tag implementations like display, call and iterate. For a more detailed explanation of the tags see [[Xebra_Taglib_Xeb| the documentation]].&lt;br /&gt;
&lt;br /&gt;
=== Taglibrary Form ===&lt;br /&gt;
The form tag library contains all tag implementations for form related tags. Automatic wrapping of values, controls and validations are included in this library. For a more detailed explanation see [[Xebra_Taglib_Form|here]].&lt;br /&gt;
&lt;br /&gt;
=== Taglibrary XRPC ===&lt;br /&gt;
This tag library contains tags for XML-RPC applications. For further information see [[Xebra_Taglib_XRPC|here]].&lt;br /&gt;
&lt;br /&gt;
=== Tags ===&lt;br /&gt;
Contains all super classes used for xebra tags and xebra tag arguments. Also contains super classes for servlet generation (XGEN_SERVLET_GENERATOR).&lt;/div&gt;</summary>
		<author><name>Sandrod</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=Xebra_Taglib_Form&amp;diff=13370</id>
		<title>Xebra Taglib Form</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=Xebra_Taglib_Form&amp;diff=13370"/>
				<updated>2009-08-31T16:41:37Z</updated>
		
		<summary type="html">&lt;p&gt;Sandrod: /* Form */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Xebra]]&lt;br /&gt;
[[Xebra About|About]] | [[Xebra Installation|Installation]] |  [[Xebra Documentation|Documentation]] |  [[Xebra Tutorial|Tutorials]] | [[Xebra FAQ|Frequently Asked Questions]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The Form Tag Library captures all the functionality related to html forms. This includes automatic wrapping of input to objects and validation.&lt;br /&gt;
&lt;br /&gt;
===Form===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Tag&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;f:form class=&amp;quot;...&amp;quot; variable=&amp;quot;...&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/f:form&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
All form tags have to be contained in a f-form. A variable and class can be optionally defined to automatically wrap input forms to an object. This variable is known in the scope of the form. Note that forms cannot be nested, as in normal xhtml forms.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;f:button text=&amp;quot;...&amp;quot; action=&amp;quot;...&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
A button is a normal html button. It is associated with a controller function (&amp;quot;action&amp;quot;) which is executed if the validation of all inputs field where successful. The automatically wrapped object is then passed to the action. The text designates the Label on the button.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;f:input_text value=&amp;quot;...&amp;quot; name=&amp;quot;...&amp;quot; text=&amp;quot;...&amp;quot; type=&amp;quot;...&amp;quot; label=&amp;quot;...&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
The designated normal html inputs. Additionally they provide a name which makes them identifiable for validation output. f-validator tags can be added to the inputs to define validators as in all wrappable inputs. The type argument is optional and defines the type of the input (for instance 'secret').&lt;br /&gt;
The optional 'label' attribute adds a label to the input.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;f:textarea value=&amp;quot;...&amp;quot; name=&amp;quot;...&amp;quot; text=&amp;quot;...&amp;quot; rows=&amp;quot;...&amp;quot; cols=&amp;quot;...&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
Basically the same as the input fields but with some additional auxiliary textarea-specific attributes (rows, cols).&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;f:drop_down_list items=&amp;quot;...&amp;quot; name=&amp;quot;...&amp;quot; value=&amp;quot;...&amp;quot; [label=&amp;quot;...&amp;quot;]/&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
This tag generates the equivalent to a &amp;lt;xml&amp;gt;&amp;lt;select&amp;gt;&amp;lt;option&amp;gt;...&amp;lt;/option&amp;gt;...&amp;lt;/select&amp;gt;&amp;lt;/xml&amp;gt; statement. items designates the list to be used in the drop down and type is an optional parameter. It defines the type of the items. If not set, it assumes Strings.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;f:check_box name=&amp;quot;...&amp;quot; label=&amp;quot;..&amp;quot; value=&amp;quot;...&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
A normal checkbox which is automatically wrapped to a boolean.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;f:command_link label=&amp;quot;...&amp;quot; action=&amp;quot;...&amp;quot; variable=&amp;quot;...&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
A command link is a html link. It acts though like a button and executes the defined action on the controller. If a variable is defined, it will be passed to the action (feature). Variable names can be used from f-form or xeb-iterate.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;f:validator class=&amp;quot;...&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
A validator validates an input. It can be added to input fields (or textareas) to check the input.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;f:validation_result name=&amp;quot;...&amp;quot; variable=&amp;quot;...&amp;quot;&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/f:validation_result&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
Stores a variable with the name of the variable attribute. It contains the error message. If there is more than one error it iterates over all errors. In this way formatting of errors is (almost) free to the designer.&lt;br /&gt;
|}&lt;br /&gt;
====Example====&lt;br /&gt;
For the forms framework we will use a simple display of reservations with an input mask and delete command links.&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
	&amp;lt;tr&amp;gt;&lt;br /&gt;
		&amp;lt;td&amp;gt;Name&amp;lt;/td&amp;gt;&lt;br /&gt;
		&amp;lt;td&amp;gt;Date&amp;lt;/td&amp;gt;&lt;br /&gt;
		&amp;lt;td&amp;gt;Persons&amp;lt;/td&amp;gt;&lt;br /&gt;
		&amp;lt;xeb:container render=&amp;quot;authenticated_admin&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;td&amp;gt;Delete&amp;lt;/td&amp;gt;&lt;br /&gt;
		&amp;lt;/xeb:container&amp;gt;&lt;br /&gt;
		&amp;lt;xeb:container render=&amp;quot;not_authenticated_admin&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;td&amp;gt;Details&amp;lt;/td&amp;gt;&lt;br /&gt;
		&amp;lt;/xeb:container&amp;gt;&lt;br /&gt;
	&amp;lt;/tr&amp;gt;&lt;br /&gt;
	&amp;lt;f:form&amp;gt;&lt;br /&gt;
	&amp;lt;xeb:iterate list=&amp;quot;global_state.db.reservations&amp;quot; variable=&amp;quot;reservation&amp;quot; type=&amp;quot;RESERVATION&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;tr&amp;gt;&lt;br /&gt;
			&amp;lt;td&amp;gt;&amp;lt;xeb:display feature=&amp;quot;#{reservation.name}&amp;quot;/&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
			&amp;lt;td&amp;gt;&amp;lt;xeb:display feature=&amp;quot;#{reservation.date}&amp;quot;/&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
			&amp;lt;td&amp;gt;&lt;br /&gt;
			&amp;lt;f:command_link label=&amp;quot;Delete&amp;quot; action=&amp;quot;delete&amp;quot; variable=&amp;quot;reservation&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;/td&amp;gt;					&lt;br /&gt;
		&amp;lt;/tr&amp;gt;&lt;br /&gt;
	&amp;lt;/xeb:iterate&amp;gt;&lt;br /&gt;
	&amp;lt;/f:form&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;h2&amp;gt;New Reservation&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;f:form variable=&amp;quot;new_reservation&amp;quot; class=&amp;quot;RESERVATION&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
	&amp;lt;tr&amp;gt;&lt;br /&gt;
		&amp;lt;td&amp;gt;Name&amp;lt;/td&amp;gt;&lt;br /&gt;
		&amp;lt;td&amp;gt;&amp;lt;f:input_text value=&amp;quot;name&amp;quot; name=&amp;quot;a_name&amp;quot; text=&amp;quot;#{new_reservation.name}&amp;quot; /&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
	&amp;lt;/tr&amp;gt;&lt;br /&gt;
	&amp;lt;tr&amp;gt;&lt;br /&gt;
		&amp;lt;td&amp;gt;Date&amp;lt;/td&amp;gt;&lt;br /&gt;
		&amp;lt;td&amp;gt;&amp;lt;f:input_text value=&amp;quot;date&amp;quot; name=&amp;quot;a_date&amp;quot; text=&amp;quot;#{new_reservation.date}&amp;quot; /&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
	&amp;lt;/tr&amp;gt;&lt;br /&gt;
	&amp;lt;tr&amp;gt;&lt;br /&gt;
		&amp;lt;td colspan=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;f:button value=&amp;quot;Save&amp;quot; action=&amp;quot;save&amp;quot; type=&amp;quot;submit&amp;quot; /&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
		&amp;lt;/td&amp;gt;&lt;br /&gt;
	&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/f:form&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;/div&gt;</summary>
		<author><name>Sandrod</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=Xebra_Taglib_Form&amp;diff=13369</id>
		<title>Xebra Taglib Form</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=Xebra_Taglib_Form&amp;diff=13369"/>
				<updated>2009-08-31T16:41:02Z</updated>
		
		<summary type="html">&lt;p&gt;Sandrod: /* Form */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Xebra]]&lt;br /&gt;
[[Xebra About|About]] | [[Xebra Installation|Installation]] |  [[Xebra Documentation|Documentation]] |  [[Xebra Tutorial|Tutorials]] | [[Xebra FAQ|Frequently Asked Questions]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The Form Tag Library captures all the functionality related to html forms. This includes automatic wrapping of input to objects and validation.&lt;br /&gt;
&lt;br /&gt;
===Form===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Tag&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;f:form class=&amp;quot;...&amp;quot; variable=&amp;quot;...&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/f:form&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
All form tags have to be contained in a f-form. A variable and class can be optionally defined to automatically wrap input forms to an object. This variable is known in the scope of the form. Note that forms cannot be nested, as in normal xhtml forms.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;f:button text=&amp;quot;...&amp;quot; action=&amp;quot;...&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
A button is a normal html button. It is associated with a controller function (&amp;quot;action&amp;quot;) which is executed if the validation of all inputs field where successful. The automatically wrapped object is then passed to the action. The text designates the Label on the button.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;f:input_text value=&amp;quot;...&amp;quot; name=&amp;quot;...&amp;quot; text=&amp;quot;...&amp;quot; type=&amp;quot;...&amp;quot; label=&amp;quot;...&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
The designated normal html inputs. Additionally they provide a name which makes them identifiable for validation output. f-validator tags can be added to the inputs to define validators as in all wrappable inputs. The type argument is optional and defines the type of the input (for instance 'secret').&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;f:textarea value=&amp;quot;...&amp;quot; name=&amp;quot;...&amp;quot; text=&amp;quot;...&amp;quot; rows=&amp;quot;...&amp;quot; cols=&amp;quot;...&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
Basically the same as the input fields but with some additional auxiliary textarea-specific attributes (rows, cols).&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;f:drop_down_list items=&amp;quot;...&amp;quot; name=&amp;quot;...&amp;quot; value=&amp;quot;...&amp;quot; [label=&amp;quot;...&amp;quot;]/&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
This tag generates the equivalent to a &amp;lt;xml&amp;gt;&amp;lt;select&amp;gt;&amp;lt;option&amp;gt;...&amp;lt;/option&amp;gt;...&amp;lt;/select&amp;gt;&amp;lt;/xml&amp;gt; statement. items designates the list to be used in the drop down and type is an optional parameter. It defines the type of the items. If not set, it assumes Strings.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;f:check_box name=&amp;quot;...&amp;quot; label=&amp;quot;..&amp;quot; value=&amp;quot;...&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
A normal checkbox which is automatically wrapped to a boolean.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;f:command_link label=&amp;quot;...&amp;quot; action=&amp;quot;...&amp;quot; variable=&amp;quot;...&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
A command link is a html link. It acts though like a button and executes the defined action on the controller. If a variable is defined, it will be passed to the action (feature). Variable names can be used from f-form or xeb-iterate.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;f:validator class=&amp;quot;...&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
A validator validates an input. It can be added to input fields (or textareas) to check the input.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;f:validation_result name=&amp;quot;...&amp;quot; variable=&amp;quot;...&amp;quot;&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/f:validation_result&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
Stores a variable with the name of the variable attribute. It contains the error message. If there is more than one error it iterates over all errors. In this way formatting of errors is (almost) free to the designer.&lt;br /&gt;
|}&lt;br /&gt;
====Example====&lt;br /&gt;
For the forms framework we will use a simple display of reservations with an input mask and delete command links.&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
	&amp;lt;tr&amp;gt;&lt;br /&gt;
		&amp;lt;td&amp;gt;Name&amp;lt;/td&amp;gt;&lt;br /&gt;
		&amp;lt;td&amp;gt;Date&amp;lt;/td&amp;gt;&lt;br /&gt;
		&amp;lt;td&amp;gt;Persons&amp;lt;/td&amp;gt;&lt;br /&gt;
		&amp;lt;xeb:container render=&amp;quot;authenticated_admin&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;td&amp;gt;Delete&amp;lt;/td&amp;gt;&lt;br /&gt;
		&amp;lt;/xeb:container&amp;gt;&lt;br /&gt;
		&amp;lt;xeb:container render=&amp;quot;not_authenticated_admin&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;td&amp;gt;Details&amp;lt;/td&amp;gt;&lt;br /&gt;
		&amp;lt;/xeb:container&amp;gt;&lt;br /&gt;
	&amp;lt;/tr&amp;gt;&lt;br /&gt;
	&amp;lt;f:form&amp;gt;&lt;br /&gt;
	&amp;lt;xeb:iterate list=&amp;quot;global_state.db.reservations&amp;quot; variable=&amp;quot;reservation&amp;quot; type=&amp;quot;RESERVATION&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;tr&amp;gt;&lt;br /&gt;
			&amp;lt;td&amp;gt;&amp;lt;xeb:display feature=&amp;quot;#{reservation.name}&amp;quot;/&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
			&amp;lt;td&amp;gt;&amp;lt;xeb:display feature=&amp;quot;#{reservation.date}&amp;quot;/&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
			&amp;lt;td&amp;gt;&lt;br /&gt;
			&amp;lt;f:command_link label=&amp;quot;Delete&amp;quot; action=&amp;quot;delete&amp;quot; variable=&amp;quot;reservation&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;/td&amp;gt;					&lt;br /&gt;
		&amp;lt;/tr&amp;gt;&lt;br /&gt;
	&amp;lt;/xeb:iterate&amp;gt;&lt;br /&gt;
	&amp;lt;/f:form&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;h2&amp;gt;New Reservation&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;f:form variable=&amp;quot;new_reservation&amp;quot; class=&amp;quot;RESERVATION&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
	&amp;lt;tr&amp;gt;&lt;br /&gt;
		&amp;lt;td&amp;gt;Name&amp;lt;/td&amp;gt;&lt;br /&gt;
		&amp;lt;td&amp;gt;&amp;lt;f:input_text value=&amp;quot;name&amp;quot; name=&amp;quot;a_name&amp;quot; text=&amp;quot;#{new_reservation.name}&amp;quot; /&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
	&amp;lt;/tr&amp;gt;&lt;br /&gt;
	&amp;lt;tr&amp;gt;&lt;br /&gt;
		&amp;lt;td&amp;gt;Date&amp;lt;/td&amp;gt;&lt;br /&gt;
		&amp;lt;td&amp;gt;&amp;lt;f:input_text value=&amp;quot;date&amp;quot; name=&amp;quot;a_date&amp;quot; text=&amp;quot;#{new_reservation.date}&amp;quot; /&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
	&amp;lt;/tr&amp;gt;&lt;br /&gt;
	&amp;lt;tr&amp;gt;&lt;br /&gt;
		&amp;lt;td colspan=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;f:button value=&amp;quot;Save&amp;quot; action=&amp;quot;save&amp;quot; type=&amp;quot;submit&amp;quot; /&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
		&amp;lt;/td&amp;gt;&lt;br /&gt;
	&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/f:form&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;/div&gt;</summary>
		<author><name>Sandrod</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=Xebra_Taglib_Xeb&amp;diff=13368</id>
		<title>Xebra Taglib Xeb</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=Xebra_Taglib_Xeb&amp;diff=13368"/>
				<updated>2009-08-31T16:38:09Z</updated>
		
		<summary type="html">&lt;p&gt;Sandrod: /* Xeb */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Xebra]]&lt;br /&gt;
[[Xebra About|About]] | [[Xebra Installation|Installation]] |  [[Xebra Documentation|Documentation]] |  [[Xebra Tutorial|Tutorials]] | [[Xebra FAQ|Frequently Asked Questions]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The Xebra Tag Library is a container for the more mundane, simple tags which are used almost everywhere. They include loops, calls to the controller and other basic functionality.&lt;br /&gt;
&lt;br /&gt;
===Xeb===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Tag&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;xeb:call feature=&amp;quot;...&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
Calls the feature on the controller on render-time.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;xeb:loop times=&amp;quot;...&amp;quot; variable=&amp;quot;...&amp;quot; &amp;gt;&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/xeb:loop&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
Loops its content &amp;quot;times&amp;quot; times. The optional 'variable' defines a local which contains the current index of the loop.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;xeb:redirect url=&amp;quot;...&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
Redirects the server to a new page at &amp;quot;url&amp;quot;. The redirect is done server internally.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;xeb:iterate list=&amp;quot;...&amp;quot; variable=&amp;quot;...&amp;quot; type=&amp;quot;...&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/xeb:iterate&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
Iterates over a list (defined with &amp;quot;list&amp;quot; as a controller call). The current item is stored in &amp;quot;variable&amp;quot; which is of type &amp;quot;type&amp;quot;.  This variable is known in the scope of the iterate tag.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;xeb:container&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/xeb:container&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
This simple tag just groups parts of the site. Can be used to conditionally render some parts with the &amp;quot;render&amp;quot; attribute.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;xeb:display text=&amp;quot;...&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
The display tag simply displays what is written in feature.&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Sandrod</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=Xebra_Documentation&amp;diff=13367</id>
		<title>Xebra Documentation</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=Xebra_Documentation&amp;diff=13367"/>
				<updated>2009-08-31T16:36:19Z</updated>
		
		<summary type="html">&lt;p&gt;Sandrod: /* Taglibrary Form */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Xebra]]&lt;br /&gt;
[[Xebra About|About]] | [[Xebra Installation|Installation]] |  [[Xebra Documentation|Documentation]] |  [[Xebra Tutorial|Tutorials]] | [[Xebra FAQ|Frequently Asked Questions]]&lt;br /&gt;
&lt;br /&gt;
=Overview=&lt;br /&gt;
* [[Xebra Socket Communication]]&lt;br /&gt;
&lt;br /&gt;
=Xebra HTTP Server Plugins=&lt;br /&gt;
* [[Xebra Module Communication Protocol|Module Communication Protocol]]&lt;br /&gt;
* [[Xebra Module Content Types|Content Types]]&lt;br /&gt;
&lt;br /&gt;
==Mod_xebra for Apache==&lt;br /&gt;
* [[Xebra Apache Module Windows|Apache Module Windows]]&lt;br /&gt;
&lt;br /&gt;
=Xebra Server=&lt;br /&gt;
* [[Xebra Server Administration]]&lt;br /&gt;
&lt;br /&gt;
= Web Applications =&lt;br /&gt;
* [[Xebra Webapp Config File]]&lt;br /&gt;
&lt;br /&gt;
==Xebra Tag Libraries==&lt;br /&gt;
On the following pages you can find the descriptions of the different tags of the available tag libraries. &lt;br /&gt;
* [[Xebra Taglib Page|Page]]&lt;br /&gt;
* [[Xebra Taglib Xeb|Xeb]]&lt;br /&gt;
* [[Xebra Taglib Form|Form]]&lt;br /&gt;
* [[Xebra Taglib XRPC|XRPC]]&lt;br /&gt;
* [[Xebra Tag Attribute|Tag Attribute]]&lt;br /&gt;
&lt;br /&gt;
==Master pages==&lt;br /&gt;
* [[Xebra Master Pages|Templates with master pages]]&lt;br /&gt;
&lt;br /&gt;
==XML_RPC==&lt;br /&gt;
* [[Xebra XML_RPC]]&lt;br /&gt;
&lt;br /&gt;
=Code documentation=&lt;br /&gt;
==Xebra Libraries==&lt;br /&gt;
=== Error===&lt;br /&gt;
Provides internal error types for all xebra applications such as XERROR_CANNOT_OPEN_FILE or XERROR_SOCKET_NOT_BOUND. These errors are not supplied to the browser but only displayed in the log/console.&lt;br /&gt;
=== Common ===&lt;br /&gt;
=== Error Responses ===&lt;br /&gt;
Classes from xebra_error_responses are split into XER_SERVER: error responses generated by the server and XER_APP: error responses generated by the webapp. Both types are ultimately sent to the http server plugin and displayed in the user's browser. For instance XER_POST_TOO_BIG is a server error response that is created if the post request is bigger than allowed. XER_APP_CANNOT_FIND_PAGE is a response created by the webapp and then sent to the server if no servlet with the specified name was defined.&lt;br /&gt;
&lt;br /&gt;
=== Http ===&lt;br /&gt;
=== Utilities ===&lt;br /&gt;
=== Thread Utilities ===&lt;br /&gt;
An implementation of a [http://en.wikipedia.org/wiki/Thread_pool_pattern| Thread Pool]. There are two implementations: with or without data class reuse (DATA_THREAD_POOL and THREAD_POOL).&lt;br /&gt;
&lt;br /&gt;
=== AST Elements ===&lt;br /&gt;
This library contains various classes which model eiffel language constructs. It consists of classes, features, comments, locals and expressions. They can be combined to build an object model of an eiffel class. Convenience features are provided to add locals and variables with unique names.&lt;br /&gt;
AST Elements can be serialized to a text representation.&lt;br /&gt;
It also contains some specialized classes for Xebra.&lt;br /&gt;
&lt;br /&gt;
=== Taglibrary Base ===&lt;br /&gt;
The base tag library contains all the basic Xebra tag implementations like display, call and iterate. For a more detailed explanation of the tags see [[Xebra_Taglib_Xeb| the documentation]].&lt;br /&gt;
&lt;br /&gt;
=== Taglibrary Form ===&lt;br /&gt;
The form tag library contains all tag implementations for form related tags. Automatic wrapping of values, controls and validations are included in this library. For a more detailed explanation see [[Xebra_Taglib_Form|here]].&lt;br /&gt;
&lt;br /&gt;
=== Taglibrary XRPC ===&lt;br /&gt;
XRPC related tag implementations.&lt;br /&gt;
&lt;br /&gt;
=== Tags ===&lt;br /&gt;
Contains all super classes used for xebra tags and xebra tag arguments. Also contains super classes for servlet generation (XGEN_SERVLET_GENERATOR).&lt;/div&gt;</summary>
		<author><name>Sandrod</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=Xebra_Documentation&amp;diff=13364</id>
		<title>Xebra Documentation</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=Xebra_Documentation&amp;diff=13364"/>
				<updated>2009-08-31T16:33:01Z</updated>
		
		<summary type="html">&lt;p&gt;Sandrod: /* Taglibrary Base */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Xebra]]&lt;br /&gt;
[[Xebra About|About]] | [[Xebra Installation|Installation]] |  [[Xebra Documentation|Documentation]] |  [[Xebra Tutorial|Tutorials]] | [[Xebra FAQ|Frequently Asked Questions]]&lt;br /&gt;
&lt;br /&gt;
=Overview=&lt;br /&gt;
* [[Xebra Socket Communication]]&lt;br /&gt;
&lt;br /&gt;
=Xebra HTTP Server Plugins=&lt;br /&gt;
* [[Xebra Module Communication Protocol|Module Communication Protocol]]&lt;br /&gt;
* [[Xebra Module Content Types|Content Types]]&lt;br /&gt;
&lt;br /&gt;
==Mod_xebra for Apache==&lt;br /&gt;
* [[Xebra Apache Module Windows|Apache Module Windows]]&lt;br /&gt;
&lt;br /&gt;
=Xebra Server=&lt;br /&gt;
* [[Xebra Server Administration]]&lt;br /&gt;
&lt;br /&gt;
= Web Applications =&lt;br /&gt;
* [[Xebra Webapp Config File]]&lt;br /&gt;
&lt;br /&gt;
==Xebra Tag Libraries==&lt;br /&gt;
On the following pages you can find the descriptions of the different tags of the available tag libraries. &lt;br /&gt;
* [[Xebra Taglib Page|Page]]&lt;br /&gt;
* [[Xebra Taglib Xeb|Xeb]]&lt;br /&gt;
* [[Xebra Taglib Form|Form]]&lt;br /&gt;
* [[Xebra Taglib XRPC|XRPC]]&lt;br /&gt;
* [[Xebra Tag Attribute|Tag Attribute]]&lt;br /&gt;
&lt;br /&gt;
==Master pages==&lt;br /&gt;
* [[Xebra Master Pages|Templates with master pages]]&lt;br /&gt;
&lt;br /&gt;
==XML_RPC==&lt;br /&gt;
* [[Xebra XML_RPC]]&lt;br /&gt;
&lt;br /&gt;
=Code documentation=&lt;br /&gt;
==Xebra Libraries==&lt;br /&gt;
=== Error===&lt;br /&gt;
Provides internal error types for all xebra applications such as XERROR_CANNOT_OPEN_FILE or XERROR_SOCKET_NOT_BOUND. These errors are not supplied to the browser but only displayed in the log/console.&lt;br /&gt;
=== Common ===&lt;br /&gt;
=== Error Responses ===&lt;br /&gt;
Classes from xebra_error_responses are split into XER_SERVER: error responses generated by the server and XER_APP: error responses generated by the webapp. Both types are ultimately sent to the http server plugin and displayed in the user's browser. For instance XER_POST_TOO_BIG is a server error response that is created if the post request is bigger than allowed. XER_APP_CANNOT_FIND_PAGE is a response created by the webapp and then sent to the server if no servlet with the specified name was defined.&lt;br /&gt;
&lt;br /&gt;
=== Http ===&lt;br /&gt;
=== Utilities ===&lt;br /&gt;
=== Thread Utilities ===&lt;br /&gt;
An implementation of a [http://en.wikipedia.org/wiki/Thread_pool_pattern| Thread Pool]. There are two implementations: with or without data class reuse (DATA_THREAD_POOL and THREAD_POOL).&lt;br /&gt;
&lt;br /&gt;
=== AST Elements ===&lt;br /&gt;
This library contains various classes which model eiffel language constructs. It consists of classes, features, comments, locals and expressions. They can be combined to build an object model of an eiffel class. Convenience features are provided to add locals and variables with unique names.&lt;br /&gt;
AST Elements can be serialized to a text representation.&lt;br /&gt;
It also contains some specialized classes for Xebra.&lt;br /&gt;
&lt;br /&gt;
=== Taglibrary Base ===&lt;br /&gt;
The base tag library contains all the basic Xebra tag implementations like display, call and iterate. For a more detailed explanation of the tags see [[Xebra_Taglib_Xeb| the documentation]].&lt;br /&gt;
&lt;br /&gt;
=== Taglibrary Form ===&lt;br /&gt;
The form tag library contains all tag implementations for form related tags. Automatic wrapping of values, controls and validations are included in this library.&lt;br /&gt;
&lt;br /&gt;
=== Taglibrary XRPC ===&lt;br /&gt;
XRPC related tag implementations.&lt;br /&gt;
&lt;br /&gt;
=== Tags ===&lt;br /&gt;
Contains all super classes used for xebra tags and xebra tag arguments. Also contains super classes for servlet generation (XGEN_SERVLET_GENERATOR).&lt;/div&gt;</summary>
		<author><name>Sandrod</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=Xebra_Documentation&amp;diff=13362</id>
		<title>Xebra Documentation</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=Xebra_Documentation&amp;diff=13362"/>
				<updated>2009-08-31T16:24:34Z</updated>
		
		<summary type="html">&lt;p&gt;Sandrod: /* AST Elements */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Xebra]]&lt;br /&gt;
[[Xebra About|About]] | [[Xebra Installation|Installation]] |  [[Xebra Documentation|Documentation]] |  [[Xebra Tutorial|Tutorials]] | [[Xebra FAQ|Frequently Asked Questions]]&lt;br /&gt;
&lt;br /&gt;
=Overview=&lt;br /&gt;
* [[Xebra Socket Communication]]&lt;br /&gt;
&lt;br /&gt;
=Xebra HTTP Server Plugins=&lt;br /&gt;
* [[Xebra Module Communication Protocol|Module Communication Protocol]]&lt;br /&gt;
* [[Xebra Module Content Types|Content Types]]&lt;br /&gt;
&lt;br /&gt;
==Mod_xebra for Apache==&lt;br /&gt;
* [[Xebra Apache Module Windows|Apache Module Windows]]&lt;br /&gt;
&lt;br /&gt;
=Xebra Server=&lt;br /&gt;
* [[Xebra Server Administration]]&lt;br /&gt;
&lt;br /&gt;
= Web Applications =&lt;br /&gt;
* [[Xebra Webapp Config File]]&lt;br /&gt;
&lt;br /&gt;
==Xebra Tag Libraries==&lt;br /&gt;
On the following pages you can find the descriptions of the different tags of the available tag libraries. &lt;br /&gt;
* [[Xebra Taglib Page|Page]]&lt;br /&gt;
* [[Xebra Taglib Xeb|Xeb]]&lt;br /&gt;
* [[Xebra Taglib Form|Form]]&lt;br /&gt;
* [[Xebra Taglib XRPC|XRPC]]&lt;br /&gt;
* [[Xebra Tag Attribute|Tag Attribute]]&lt;br /&gt;
&lt;br /&gt;
==Master pages==&lt;br /&gt;
* [[Xebra Master Pages|Templates with master pages]]&lt;br /&gt;
&lt;br /&gt;
==XML_RPC==&lt;br /&gt;
* [[Xebra XML_RPC]]&lt;br /&gt;
&lt;br /&gt;
=Code documentation=&lt;br /&gt;
==Xebra Libraries==&lt;br /&gt;
=== Error===&lt;br /&gt;
Provides internal error types for all xebra applications such as XERROR_CANNOT_OPEN_FILE or XERROR_SOCKET_NOT_BOUND. These errors are not supplied to the browser but only displayed in the log/console.&lt;br /&gt;
=== Common ===&lt;br /&gt;
=== Error Responses ===&lt;br /&gt;
Classes from xebra_error_responses are split into XER_SERVER: error responses generated by the server and XER_APP: error responses generated by the webapp. Both types are ultimately sent to the http server plugin and displayed in the user's browser. For instance XER_POST_TOO_BIG is a server error response that is created if the post request is bigger than allowed. XER_APP_CANNOT_FIND_PAGE is a response created by the webapp and then sent to the server if no servlet with the specified name was defined.&lt;br /&gt;
&lt;br /&gt;
=== Http ===&lt;br /&gt;
=== Utilities ===&lt;br /&gt;
=== Thread Utilities ===&lt;br /&gt;
An implementation of a [http://en.wikipedia.org/wiki/Thread_pool_pattern| Thread Pool]. There are two implementations: with or without data class reuse (DATA_THREAD_POOL and THREAD_POOL).&lt;br /&gt;
&lt;br /&gt;
=== AST Elements ===&lt;br /&gt;
This library contains various classes which model eiffel language constructs. It consists of classes, features, comments, locals and expressions. They can be combined to build an object model of an eiffel class. Convenience features are provided to add locals and variables with unique names.&lt;br /&gt;
AST Elements can be serialized to a text representation.&lt;br /&gt;
It also contains some specialized classes for Xebra.&lt;br /&gt;
&lt;br /&gt;
=== Taglibrary Base ===&lt;br /&gt;
The base tag library contains all the basic Xebra tag implementations like display, call and iterate.&lt;br /&gt;
&lt;br /&gt;
=== Taglibrary Form ===&lt;br /&gt;
The form tag library contains all tag implementations for form related tags. Automatic wrapping of values, controls and validations are included in this library.&lt;br /&gt;
&lt;br /&gt;
=== Taglibrary XRPC ===&lt;br /&gt;
XRPC related tag implementations.&lt;br /&gt;
&lt;br /&gt;
=== Tags ===&lt;br /&gt;
Contains all super classes used for xebra tags and xebra tag arguments. Also contains super classes for servlet generation (XGEN_SERVLET_GENERATOR).&lt;/div&gt;</summary>
		<author><name>Sandrod</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=Xebra_Documentation&amp;diff=13361</id>
		<title>Xebra Documentation</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=Xebra_Documentation&amp;diff=13361"/>
				<updated>2009-08-31T16:17:21Z</updated>
		
		<summary type="html">&lt;p&gt;Sandrod: /* Thread Utilities */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Xebra]]&lt;br /&gt;
[[Xebra About|About]] | [[Xebra Installation|Installation]] |  [[Xebra Documentation|Documentation]] |  [[Xebra Tutorial|Tutorials]] | [[Xebra FAQ|Frequently Asked Questions]]&lt;br /&gt;
&lt;br /&gt;
=Overview=&lt;br /&gt;
* [[Xebra Socket Communication]]&lt;br /&gt;
&lt;br /&gt;
=Xebra HTTP Server Plugins=&lt;br /&gt;
* [[Xebra Module Communication Protocol|Module Communication Protocol]]&lt;br /&gt;
* [[Xebra Module Content Types|Content Types]]&lt;br /&gt;
&lt;br /&gt;
==Mod_xebra for Apache==&lt;br /&gt;
* [[Xebra Apache Module Windows|Apache Module Windows]]&lt;br /&gt;
&lt;br /&gt;
=Xebra Server=&lt;br /&gt;
* [[Xebra Server Administration]]&lt;br /&gt;
&lt;br /&gt;
= Web Applications =&lt;br /&gt;
* [[Xebra Webapp Config File]]&lt;br /&gt;
&lt;br /&gt;
==Xebra Tag Libraries==&lt;br /&gt;
On the following pages you can find the descriptions of the different tags of the available tag libraries. &lt;br /&gt;
* [[Xebra Taglib Page|Page]]&lt;br /&gt;
* [[Xebra Taglib Xeb|Xeb]]&lt;br /&gt;
* [[Xebra Taglib Form|Form]]&lt;br /&gt;
* [[Xebra Taglib XRPC|XRPC]]&lt;br /&gt;
* [[Xebra Tag Attribute|Tag Attribute]]&lt;br /&gt;
&lt;br /&gt;
==Master pages==&lt;br /&gt;
* [[Xebra Master Pages|Templates with master pages]]&lt;br /&gt;
&lt;br /&gt;
==XML_RPC==&lt;br /&gt;
* [[Xebra XML_RPC]]&lt;br /&gt;
&lt;br /&gt;
=Code documentation=&lt;br /&gt;
==Xebra Libraries==&lt;br /&gt;
=== Error===&lt;br /&gt;
Provides internal error types for all xebra applications such as XERROR_CANNOT_OPEN_FILE or XERROR_SOCKET_NOT_BOUND. These errors are not supplied to the browser but only displayed in the log/console.&lt;br /&gt;
=== Common ===&lt;br /&gt;
=== Error Responses ===&lt;br /&gt;
Classes from xebra_error_responses are split into XER_SERVER: error responses generated by the server and XER_APP: error responses generated by the webapp. Both types are ultimately sent to the http server plugin and displayed in the user's browser. For instance XER_POST_TOO_BIG is a server error response that is created if the post request is bigger than allowed. XER_APP_CANNOT_FIND_PAGE is a response created by the webapp and then sent to the server if no servlet with the specified name was defined.&lt;br /&gt;
&lt;br /&gt;
=== Http ===&lt;br /&gt;
=== Utilities ===&lt;br /&gt;
=== Thread Utilities ===&lt;br /&gt;
An implementation of a [http://en.wikipedia.org/wiki/Thread_pool_pattern| Thread Pool]. There are two implementations: with or without data class reuse (DATA_THREAD_POOL and THREAD_POOL).&lt;br /&gt;
&lt;br /&gt;
=== AST Elements ===&lt;br /&gt;
Various classes which model eiffel classes, features and other components. They facilitate serialization and generation of eiffel files.&lt;br /&gt;
&lt;br /&gt;
=== Taglibrary Base ===&lt;br /&gt;
The base tag library contains all the basic Xebra tag implementations like display, call and iterate.&lt;br /&gt;
&lt;br /&gt;
=== Taglibrary Form ===&lt;br /&gt;
The form tag library contains all tag implementations for form related tags. Automatic wrapping of values, controls and validations are included in this library.&lt;br /&gt;
&lt;br /&gt;
=== Taglibrary XRPC ===&lt;br /&gt;
XRPC related tag implementations.&lt;br /&gt;
&lt;br /&gt;
=== Tags ===&lt;br /&gt;
Contains all super classes used for xebra tags and xebra tag arguments. Also contains super classes for servlet generation (XGEN_SERVLET_GENERATOR).&lt;/div&gt;</summary>
		<author><name>Sandrod</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=Xebra_Documentation&amp;diff=13350</id>
		<title>Xebra Documentation</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=Xebra_Documentation&amp;diff=13350"/>
				<updated>2009-08-28T20:49:03Z</updated>
		
		<summary type="html">&lt;p&gt;Sandrod: /* Tags */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Xebra]]&lt;br /&gt;
[[Xebra About|About]] | [[Xebra Installation|Installation]] |  [[Xebra Documentation|Documentation]] |  [[Xebra Tutorial|Tutorials]] | [[Xebra FAQ|Frequently Asked Questions]]&lt;br /&gt;
&lt;br /&gt;
=Overview=&lt;br /&gt;
* [[Xebra Socket Communication]]&lt;br /&gt;
&lt;br /&gt;
=Xebra HTTP Server Plugins=&lt;br /&gt;
* [[Xebra Module Communication Protocol|Module Communication Protocol]]&lt;br /&gt;
* [[Xebra Module Content Types|Content Types]]&lt;br /&gt;
&lt;br /&gt;
==Mod_xebra for Apache==&lt;br /&gt;
* [[Xebra Apache Module Windows|Apache Module Windows]]&lt;br /&gt;
&lt;br /&gt;
=Xebra Server=&lt;br /&gt;
* [[Xebra Server Administration]]&lt;br /&gt;
&lt;br /&gt;
= Web Applications =&lt;br /&gt;
* [[Xebra Webapp Config File]]&lt;br /&gt;
&lt;br /&gt;
==Xebra Tag Libraries==&lt;br /&gt;
On the following pages you can find the descriptions of the different tags of the available tag libraries. &lt;br /&gt;
* [[Xebra Taglib Page|Page]]&lt;br /&gt;
* [[Xebra Taglib Xeb|Xeb]]&lt;br /&gt;
* [[Xebra Taglib Form|Form]]&lt;br /&gt;
* [[Xebra Taglib XRPC|XRPC]]&lt;br /&gt;
* [[Xebra Tag Attribute|Tag Attribute]]&lt;br /&gt;
&lt;br /&gt;
==Master pages==&lt;br /&gt;
* [[Xebra Master Pages|Templates with master pages]]&lt;br /&gt;
&lt;br /&gt;
==XML_RPC==&lt;br /&gt;
* [[Xebra XML_RPC]]&lt;br /&gt;
&lt;br /&gt;
=Code documentation=&lt;br /&gt;
==Xebra Libraries==&lt;br /&gt;
=== Error===&lt;br /&gt;
Provides internal error types for all xebra applications such as XERROR_CANNOT_OPEN_FILE or XERROR_SOCKET_NOT_BOUND. These errors are not supplied to the browser but only displayed in the log/console.&lt;br /&gt;
=== Common ===&lt;br /&gt;
=== Error Responses ===&lt;br /&gt;
Classes from xebra_error_responses are split into XER_SERVER: error responses generated by the server and XER_APP: error responses generated by the webapp. Both types are ultimately sent to the http server plugin and displayed in the user's browser. For instance XER_POST_TOO_BIG is a server error response that is created if the post request is bigger than allowed. XER_APP_CANNOT_FIND_PAGE is a response created by the webapp and then sent to the server if no servlet with the specified name was defined.&lt;br /&gt;
&lt;br /&gt;
=== Http ===&lt;br /&gt;
=== Utilities ===&lt;br /&gt;
=== Thread Utilities ===&lt;br /&gt;
Utilities for thread use. Mainly a Thread Pool.&lt;br /&gt;
&lt;br /&gt;
=== AST Elements ===&lt;br /&gt;
Various classes which model eiffel classes, features and other components. They facilitate serialization and generation of eiffel files.&lt;br /&gt;
&lt;br /&gt;
=== Taglibrary Base ===&lt;br /&gt;
The base tag library contains all the basic Xebra tag implementations like display, call and iterate.&lt;br /&gt;
&lt;br /&gt;
=== Taglibrary Form ===&lt;br /&gt;
The form tag library contains all tag implementations for form related tags. Automatic wrapping of values, controls and validations are included in this library.&lt;br /&gt;
&lt;br /&gt;
=== Taglibrary XRPC ===&lt;br /&gt;
XRPC related tag implementations.&lt;br /&gt;
&lt;br /&gt;
=== Tags ===&lt;br /&gt;
Contains all super classes used for xebra tags and xebra tag arguments. Also contains super classes for servlet generation (XGEN_SERVLET_GENERATOR).&lt;/div&gt;</summary>
		<author><name>Sandrod</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=Xebra_Documentation&amp;diff=13349</id>
		<title>Xebra Documentation</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=Xebra_Documentation&amp;diff=13349"/>
				<updated>2009-08-28T20:44:54Z</updated>
		
		<summary type="html">&lt;p&gt;Sandrod: /* Taglibrary XRPC */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Xebra]]&lt;br /&gt;
[[Xebra About|About]] | [[Xebra Installation|Installation]] |  [[Xebra Documentation|Documentation]] |  [[Xebra Tutorial|Tutorials]] | [[Xebra FAQ|Frequently Asked Questions]]&lt;br /&gt;
&lt;br /&gt;
=Overview=&lt;br /&gt;
* [[Xebra Socket Communication]]&lt;br /&gt;
&lt;br /&gt;
=Xebra HTTP Server Plugins=&lt;br /&gt;
* [[Xebra Module Communication Protocol|Module Communication Protocol]]&lt;br /&gt;
* [[Xebra Module Content Types|Content Types]]&lt;br /&gt;
&lt;br /&gt;
==Mod_xebra for Apache==&lt;br /&gt;
* [[Xebra Apache Module Windows|Apache Module Windows]]&lt;br /&gt;
&lt;br /&gt;
=Xebra Server=&lt;br /&gt;
* [[Xebra Server Administration]]&lt;br /&gt;
&lt;br /&gt;
= Web Applications =&lt;br /&gt;
* [[Xebra Webapp Config File]]&lt;br /&gt;
&lt;br /&gt;
==Xebra Tag Libraries==&lt;br /&gt;
On the following pages you can find the descriptions of the different tags of the available tag libraries. &lt;br /&gt;
* [[Xebra Taglib Page|Page]]&lt;br /&gt;
* [[Xebra Taglib Xeb|Xeb]]&lt;br /&gt;
* [[Xebra Taglib Form|Form]]&lt;br /&gt;
* [[Xebra Taglib XRPC|XRPC]]&lt;br /&gt;
* [[Xebra Tag Attribute|Tag Attribute]]&lt;br /&gt;
&lt;br /&gt;
==Master pages==&lt;br /&gt;
* [[Xebra Master Pages|Templates with master pages]]&lt;br /&gt;
&lt;br /&gt;
==XML_RPC==&lt;br /&gt;
* [[Xebra XML_RPC]]&lt;br /&gt;
&lt;br /&gt;
=Code documentation=&lt;br /&gt;
==Xebra Libraries==&lt;br /&gt;
=== Error===&lt;br /&gt;
Provides internal error types for all xebra applications such as XERROR_CANNOT_OPEN_FILE or XERROR_SOCKET_NOT_BOUND. These errors are not supplied to the browser but only displayed in the log/console.&lt;br /&gt;
=== Common ===&lt;br /&gt;
=== Error Responses ===&lt;br /&gt;
Classes from xebra_error_responses are split into XER_SERVER: error responses generated by the server and XER_APP: error responses generated by the webapp. Both types are ultimately sent to the http server plugin and displayed in the user's browser. For instance XER_POST_TOO_BIG is a server error response that is created if the post request is bigger than allowed. XER_APP_CANNOT_FIND_PAGE is a response created by the webapp and then sent to the server if no servlet with the specified name was defined.&lt;br /&gt;
&lt;br /&gt;
=== Http ===&lt;br /&gt;
=== Utilities ===&lt;br /&gt;
=== Thread Utilities ===&lt;br /&gt;
Utilities for thread use. Mainly a Thread Pool.&lt;br /&gt;
&lt;br /&gt;
=== AST Elements ===&lt;br /&gt;
Various classes which model eiffel classes, features and other components. They facilitate serialization and generation of eiffel files.&lt;br /&gt;
&lt;br /&gt;
=== Taglibrary Base ===&lt;br /&gt;
The base tag library contains all the basic Xebra tag implementations like display, call and iterate.&lt;br /&gt;
&lt;br /&gt;
=== Taglibrary Form ===&lt;br /&gt;
The form tag library contains all tag implementations for form related tags. Automatic wrapping of values, controls and validations are included in this library.&lt;br /&gt;
&lt;br /&gt;
=== Taglibrary XRPC ===&lt;br /&gt;
XRPC related tag implementations.&lt;br /&gt;
&lt;br /&gt;
=== Tags ===&lt;/div&gt;</summary>
		<author><name>Sandrod</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=Xebra_Documentation&amp;diff=13348</id>
		<title>Xebra Documentation</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=Xebra_Documentation&amp;diff=13348"/>
				<updated>2009-08-28T20:44:27Z</updated>
		
		<summary type="html">&lt;p&gt;Sandrod: /* Thread Utilities */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Xebra]]&lt;br /&gt;
[[Xebra About|About]] | [[Xebra Installation|Installation]] |  [[Xebra Documentation|Documentation]] |  [[Xebra Tutorial|Tutorials]] | [[Xebra FAQ|Frequently Asked Questions]]&lt;br /&gt;
&lt;br /&gt;
=Overview=&lt;br /&gt;
* [[Xebra Socket Communication]]&lt;br /&gt;
&lt;br /&gt;
=Xebra HTTP Server Plugins=&lt;br /&gt;
* [[Xebra Module Communication Protocol|Module Communication Protocol]]&lt;br /&gt;
* [[Xebra Module Content Types|Content Types]]&lt;br /&gt;
&lt;br /&gt;
==Mod_xebra for Apache==&lt;br /&gt;
* [[Xebra Apache Module Windows|Apache Module Windows]]&lt;br /&gt;
&lt;br /&gt;
=Xebra Server=&lt;br /&gt;
* [[Xebra Server Administration]]&lt;br /&gt;
&lt;br /&gt;
= Web Applications =&lt;br /&gt;
* [[Xebra Webapp Config File]]&lt;br /&gt;
&lt;br /&gt;
==Xebra Tag Libraries==&lt;br /&gt;
On the following pages you can find the descriptions of the different tags of the available tag libraries. &lt;br /&gt;
* [[Xebra Taglib Page|Page]]&lt;br /&gt;
* [[Xebra Taglib Xeb|Xeb]]&lt;br /&gt;
* [[Xebra Taglib Form|Form]]&lt;br /&gt;
* [[Xebra Taglib XRPC|XRPC]]&lt;br /&gt;
* [[Xebra Tag Attribute|Tag Attribute]]&lt;br /&gt;
&lt;br /&gt;
==Master pages==&lt;br /&gt;
* [[Xebra Master Pages|Templates with master pages]]&lt;br /&gt;
&lt;br /&gt;
==XML_RPC==&lt;br /&gt;
* [[Xebra XML_RPC]]&lt;br /&gt;
&lt;br /&gt;
=Code documentation=&lt;br /&gt;
==Xebra Libraries==&lt;br /&gt;
=== Error===&lt;br /&gt;
Provides internal error types for all xebra applications such as XERROR_CANNOT_OPEN_FILE or XERROR_SOCKET_NOT_BOUND. These errors are not supplied to the browser but only displayed in the log/console.&lt;br /&gt;
=== Common ===&lt;br /&gt;
=== Error Responses ===&lt;br /&gt;
Classes from xebra_error_responses are split into XER_SERVER: error responses generated by the server and XER_APP: error responses generated by the webapp. Both types are ultimately sent to the http server plugin and displayed in the user's browser. For instance XER_POST_TOO_BIG is a server error response that is created if the post request is bigger than allowed. XER_APP_CANNOT_FIND_PAGE is a response created by the webapp and then sent to the server if no servlet with the specified name was defined.&lt;br /&gt;
&lt;br /&gt;
=== Http ===&lt;br /&gt;
=== Utilities ===&lt;br /&gt;
=== Thread Utilities ===&lt;br /&gt;
Utilities for thread use. Mainly a Thread Pool.&lt;br /&gt;
&lt;br /&gt;
=== AST Elements ===&lt;br /&gt;
Various classes which model eiffel classes, features and other components. They facilitate serialization and generation of eiffel files.&lt;br /&gt;
&lt;br /&gt;
=== Taglibrary Base ===&lt;br /&gt;
The base tag library contains all the basic Xebra tag implementations like display, call and iterate.&lt;br /&gt;
&lt;br /&gt;
=== Taglibrary Form ===&lt;br /&gt;
The form tag library contains all tag implementations for form related tags. Automatic wrapping of values, controls and validations are included in this library.&lt;br /&gt;
&lt;br /&gt;
=== Taglibrary XRPC ===&lt;br /&gt;
=== Tags ===&lt;/div&gt;</summary>
		<author><name>Sandrod</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=Xebra_Documentation&amp;diff=13347</id>
		<title>Xebra Documentation</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=Xebra_Documentation&amp;diff=13347"/>
				<updated>2009-08-28T20:44:07Z</updated>
		
		<summary type="html">&lt;p&gt;Sandrod: /* AST Elements */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Xebra]]&lt;br /&gt;
[[Xebra About|About]] | [[Xebra Installation|Installation]] |  [[Xebra Documentation|Documentation]] |  [[Xebra Tutorial|Tutorials]] | [[Xebra FAQ|Frequently Asked Questions]]&lt;br /&gt;
&lt;br /&gt;
=Overview=&lt;br /&gt;
* [[Xebra Socket Communication]]&lt;br /&gt;
&lt;br /&gt;
=Xebra HTTP Server Plugins=&lt;br /&gt;
* [[Xebra Module Communication Protocol|Module Communication Protocol]]&lt;br /&gt;
* [[Xebra Module Content Types|Content Types]]&lt;br /&gt;
&lt;br /&gt;
==Mod_xebra for Apache==&lt;br /&gt;
* [[Xebra Apache Module Windows|Apache Module Windows]]&lt;br /&gt;
&lt;br /&gt;
=Xebra Server=&lt;br /&gt;
* [[Xebra Server Administration]]&lt;br /&gt;
&lt;br /&gt;
= Web Applications =&lt;br /&gt;
* [[Xebra Webapp Config File]]&lt;br /&gt;
&lt;br /&gt;
==Xebra Tag Libraries==&lt;br /&gt;
On the following pages you can find the descriptions of the different tags of the available tag libraries. &lt;br /&gt;
* [[Xebra Taglib Page|Page]]&lt;br /&gt;
* [[Xebra Taglib Xeb|Xeb]]&lt;br /&gt;
* [[Xebra Taglib Form|Form]]&lt;br /&gt;
* [[Xebra Taglib XRPC|XRPC]]&lt;br /&gt;
* [[Xebra Tag Attribute|Tag Attribute]]&lt;br /&gt;
&lt;br /&gt;
==Master pages==&lt;br /&gt;
* [[Xebra Master Pages|Templates with master pages]]&lt;br /&gt;
&lt;br /&gt;
==XML_RPC==&lt;br /&gt;
* [[Xebra XML_RPC]]&lt;br /&gt;
&lt;br /&gt;
=Code documentation=&lt;br /&gt;
==Xebra Libraries==&lt;br /&gt;
=== Error===&lt;br /&gt;
Provides internal error types for all xebra applications such as XERROR_CANNOT_OPEN_FILE or XERROR_SOCKET_NOT_BOUND. These errors are not supplied to the browser but only displayed in the log/console.&lt;br /&gt;
=== Common ===&lt;br /&gt;
=== Error Responses ===&lt;br /&gt;
Classes from xebra_error_responses are split into XER_SERVER: error responses generated by the server and XER_APP: error responses generated by the webapp. Both types are ultimately sent to the http server plugin and displayed in the user's browser. For instance XER_POST_TOO_BIG is a server error response that is created if the post request is bigger than allowed. XER_APP_CANNOT_FIND_PAGE is a response created by the webapp and then sent to the server if no servlet with the specified name was defined.&lt;br /&gt;
&lt;br /&gt;
=== Http ===&lt;br /&gt;
=== Utilities ===&lt;br /&gt;
=== Thread Utilities ===&lt;br /&gt;
=== AST Elements ===&lt;br /&gt;
Various classes which model eiffel classes, features and other components. They facilitate serialization and generation of eiffel files.&lt;br /&gt;
&lt;br /&gt;
=== Taglibrary Base ===&lt;br /&gt;
The base tag library contains all the basic Xebra tag implementations like display, call and iterate.&lt;br /&gt;
&lt;br /&gt;
=== Taglibrary Form ===&lt;br /&gt;
The form tag library contains all tag implementations for form related tags. Automatic wrapping of values, controls and validations are included in this library.&lt;br /&gt;
&lt;br /&gt;
=== Taglibrary XRPC ===&lt;br /&gt;
=== Tags ===&lt;/div&gt;</summary>
		<author><name>Sandrod</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=Xebra_Documentation&amp;diff=13346</id>
		<title>Xebra Documentation</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=Xebra_Documentation&amp;diff=13346"/>
				<updated>2009-08-28T20:41:49Z</updated>
		
		<summary type="html">&lt;p&gt;Sandrod: /* Taglibrary Form */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Xebra]]&lt;br /&gt;
[[Xebra About|About]] | [[Xebra Installation|Installation]] |  [[Xebra Documentation|Documentation]] |  [[Xebra Tutorial|Tutorials]] | [[Xebra FAQ|Frequently Asked Questions]]&lt;br /&gt;
&lt;br /&gt;
=Overview=&lt;br /&gt;
* [[Xebra Socket Communication]]&lt;br /&gt;
&lt;br /&gt;
=Xebra HTTP Server Plugins=&lt;br /&gt;
* [[Xebra Module Communication Protocol|Module Communication Protocol]]&lt;br /&gt;
* [[Xebra Module Content Types|Content Types]]&lt;br /&gt;
&lt;br /&gt;
==Mod_xebra for Apache==&lt;br /&gt;
* [[Xebra Apache Module Windows|Apache Module Windows]]&lt;br /&gt;
&lt;br /&gt;
=Xebra Server=&lt;br /&gt;
* [[Xebra Server Administration]]&lt;br /&gt;
&lt;br /&gt;
= Web Applications =&lt;br /&gt;
* [[Xebra Webapp Config File]]&lt;br /&gt;
&lt;br /&gt;
==Xebra Tag Libraries==&lt;br /&gt;
On the following pages you can find the descriptions of the different tags of the available tag libraries. &lt;br /&gt;
* [[Xebra Taglib Page|Page]]&lt;br /&gt;
* [[Xebra Taglib Xeb|Xeb]]&lt;br /&gt;
* [[Xebra Taglib Form|Form]]&lt;br /&gt;
* [[Xebra Taglib XRPC|XRPC]]&lt;br /&gt;
* [[Xebra Tag Attribute|Tag Attribute]]&lt;br /&gt;
&lt;br /&gt;
==Master pages==&lt;br /&gt;
* [[Xebra Master Pages|Templates with master pages]]&lt;br /&gt;
&lt;br /&gt;
==XML_RPC==&lt;br /&gt;
* [[Xebra XML_RPC]]&lt;br /&gt;
&lt;br /&gt;
=Code documentation=&lt;br /&gt;
==Xebra Libraries==&lt;br /&gt;
=== Error===&lt;br /&gt;
Provides internal error types for all xebra applications such as XERROR_CANNOT_OPEN_FILE or XERROR_SOCKET_NOT_BOUND. These errors are not supplied to the browser but only displayed in the log/console.&lt;br /&gt;
=== Common ===&lt;br /&gt;
=== Error Responses ===&lt;br /&gt;
Classes from xebra_error_responses are split into XER_SERVER: error responses generated by the server and XER_APP: error responses generated by the webapp. Both types are ultimately sent to the http server plugin and displayed in the user's browser. For instance XER_POST_TOO_BIG is a server error response that is created if the post request is bigger than allowed. XER_APP_CANNOT_FIND_PAGE is a response created by the webapp and then sent to the server if no servlet with the specified name was defined.&lt;br /&gt;
&lt;br /&gt;
=== Http ===&lt;br /&gt;
=== Utilities ===&lt;br /&gt;
=== Thread Utilities ===&lt;br /&gt;
=== AST Elements ===&lt;br /&gt;
=== Taglibrary Base ===&lt;br /&gt;
The base tag library contains all the basic Xebra tag implementations like display, call and iterate.&lt;br /&gt;
&lt;br /&gt;
=== Taglibrary Form ===&lt;br /&gt;
The form tag library contains all tag implementations for form related tags. Automatic wrapping of values, controls and validations are included in this library.&lt;br /&gt;
&lt;br /&gt;
=== Taglibrary XRPC ===&lt;br /&gt;
=== Tags ===&lt;/div&gt;</summary>
		<author><name>Sandrod</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=Xebra_Documentation&amp;diff=13345</id>
		<title>Xebra Documentation</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=Xebra_Documentation&amp;diff=13345"/>
				<updated>2009-08-28T20:40:22Z</updated>
		
		<summary type="html">&lt;p&gt;Sandrod: /* Taglibrary Base */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Xebra]]&lt;br /&gt;
[[Xebra About|About]] | [[Xebra Installation|Installation]] |  [[Xebra Documentation|Documentation]] |  [[Xebra Tutorial|Tutorials]] | [[Xebra FAQ|Frequently Asked Questions]]&lt;br /&gt;
&lt;br /&gt;
=Overview=&lt;br /&gt;
* [[Xebra Socket Communication]]&lt;br /&gt;
&lt;br /&gt;
=Xebra HTTP Server Plugins=&lt;br /&gt;
* [[Xebra Module Communication Protocol|Module Communication Protocol]]&lt;br /&gt;
* [[Xebra Module Content Types|Content Types]]&lt;br /&gt;
&lt;br /&gt;
==Mod_xebra for Apache==&lt;br /&gt;
* [[Xebra Apache Module Windows|Apache Module Windows]]&lt;br /&gt;
&lt;br /&gt;
=Xebra Server=&lt;br /&gt;
* [[Xebra Server Administration]]&lt;br /&gt;
&lt;br /&gt;
= Web Applications =&lt;br /&gt;
* [[Xebra Webapp Config File]]&lt;br /&gt;
&lt;br /&gt;
==Xebra Tag Libraries==&lt;br /&gt;
On the following pages you can find the descriptions of the different tags of the available tag libraries. &lt;br /&gt;
* [[Xebra Taglib Page|Page]]&lt;br /&gt;
* [[Xebra Taglib Xeb|Xeb]]&lt;br /&gt;
* [[Xebra Taglib Form|Form]]&lt;br /&gt;
* [[Xebra Taglib XRPC|XRPC]]&lt;br /&gt;
* [[Xebra Tag Attribute|Tag Attribute]]&lt;br /&gt;
&lt;br /&gt;
==Master pages==&lt;br /&gt;
* [[Xebra Master Pages|Templates with master pages]]&lt;br /&gt;
&lt;br /&gt;
==XML_RPC==&lt;br /&gt;
* [[Xebra XML_RPC]]&lt;br /&gt;
&lt;br /&gt;
=Code documentation=&lt;br /&gt;
==Xebra Libraries==&lt;br /&gt;
=== Error===&lt;br /&gt;
Provides internal error types for all xebra applications such as XERROR_CANNOT_OPEN_FILE or XERROR_SOCKET_NOT_BOUND. These errors are not supplied to the browser but only displayed in the log/console.&lt;br /&gt;
=== Common ===&lt;br /&gt;
=== Error Responses ===&lt;br /&gt;
Classes from xebra_error_responses are split into XER_SERVER: error responses generated by the server and XER_APP: error responses generated by the webapp. Both types are ultimately sent to the http server plugin and displayed in the user's browser. For instance XER_POST_TOO_BIG is a server error response that is created if the post request is bigger than allowed. XER_APP_CANNOT_FIND_PAGE is a response created by the webapp and then sent to the server if no servlet with the specified name was defined.&lt;br /&gt;
&lt;br /&gt;
=== Http ===&lt;br /&gt;
=== Utilities ===&lt;br /&gt;
=== Thread Utilities ===&lt;br /&gt;
=== AST Elements ===&lt;br /&gt;
=== Taglibrary Base ===&lt;br /&gt;
The base tag library contains all the basic Xebra tag implementations like display, call and iterate.&lt;br /&gt;
&lt;br /&gt;
=== Taglibrary Form ===&lt;br /&gt;
=== Taglibrary XRPC ===&lt;br /&gt;
=== Tags ===&lt;/div&gt;</summary>
		<author><name>Sandrod</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=Xebra_Documentation&amp;diff=13344</id>
		<title>Xebra Documentation</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=Xebra_Documentation&amp;diff=13344"/>
				<updated>2009-08-28T20:33:34Z</updated>
		
		<summary type="html">&lt;p&gt;Sandrod: /* Xebra Libraries */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Xebra]]&lt;br /&gt;
[[Xebra About|About]] | [[Xebra Installation|Installation]] |  [[Xebra Documentation|Documentation]] |  [[Xebra Tutorial|Tutorials]] | [[Xebra FAQ|Frequently Asked Questions]]&lt;br /&gt;
&lt;br /&gt;
=Overview=&lt;br /&gt;
* [[Xebra Socket Communication]]&lt;br /&gt;
&lt;br /&gt;
=Xebra HTTP Server Plugins=&lt;br /&gt;
* [[Xebra Module Communication Protocol|Module Communication Protocol]]&lt;br /&gt;
* [[Xebra Module Content Types|Content Types]]&lt;br /&gt;
&lt;br /&gt;
==Mod_xebra for Apache==&lt;br /&gt;
* [[Xebra Apache Module Windows|Apache Module Windows]]&lt;br /&gt;
&lt;br /&gt;
=Xebra Server=&lt;br /&gt;
* [[Xebra Server Administration]]&lt;br /&gt;
&lt;br /&gt;
= Web Applications =&lt;br /&gt;
* [[Xebra Webapp Config File]]&lt;br /&gt;
&lt;br /&gt;
==Xebra Tag Libraries==&lt;br /&gt;
On the following pages you can find the descriptions of the different tags of the available tag libraries. &lt;br /&gt;
* [[Xebra Taglib Page|Page]]&lt;br /&gt;
* [[Xebra Taglib Xeb|Xeb]]&lt;br /&gt;
* [[Xebra Taglib Form|Form]]&lt;br /&gt;
* [[Xebra Taglib XRPC|XRPC]]&lt;br /&gt;
* [[Xebra Tag Attribute|Tag Attribute]]&lt;br /&gt;
&lt;br /&gt;
==Master pages==&lt;br /&gt;
* [[Xebra Master Pages|Templates with master pages]]&lt;br /&gt;
&lt;br /&gt;
==XML_RPC==&lt;br /&gt;
* [[Xebra XML_RPC]]&lt;br /&gt;
&lt;br /&gt;
=Code documentation=&lt;br /&gt;
==Xebra Libraries==&lt;br /&gt;
=== Error===&lt;br /&gt;
Provides internal error types for all xebra applications such as XERROR_CANNOT_OPEN_FILE or XERROR_SOCKET_NOT_BOUND. These errors are not supplied to the browser but only displayed in the log/console.&lt;br /&gt;
=== Common ===&lt;br /&gt;
=== Error Responses ===&lt;br /&gt;
Classes from xebra_error_responses are split into XER_SERVER: error responses generated by the server and XER_APP: error responses generated by the webapp. Both types are ultimately sent to the http server plugin and displayed in the user's browser. For instance XER_POST_TOO_BIG is a server error response that is created if the post request is bigger than allowed. XER_APP_CANNOT_FIND_PAGE is a response created by the webapp and then sent to the server if no servlet with the specified name was defined.&lt;br /&gt;
&lt;br /&gt;
=== Http ===&lt;br /&gt;
=== Utilities ===&lt;br /&gt;
=== Thread Utilities ===&lt;br /&gt;
=== AST Elements ===&lt;br /&gt;
=== Taglibrary Base ===&lt;br /&gt;
=== Taglibrary Form ===&lt;br /&gt;
=== Taglibrary XRPC ===&lt;br /&gt;
=== Tags ===&lt;/div&gt;</summary>
		<author><name>Sandrod</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=PEG_Library&amp;diff=13255</id>
		<title>PEG Library</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=PEG_Library&amp;diff=13255"/>
				<updated>2009-08-24T15:58:53Z</updated>
		
		<summary type="html">&lt;p&gt;Sandrod: /* Internal DSL */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page describes the Parsing Expression Library implementation for Eiffel. Information about PEGs can be found here [http://en.wikipedia.org/wiki/Parsing_expression_grammar].&lt;br /&gt;
&lt;br /&gt;
==Basic classes==&lt;br /&gt;
All parsers inherit from PEG_ABSTRACT_PEG which defines the common functionalities. The parsers are the same as in the definition of Wikipedia with additional classes like whitespace support.&lt;br /&gt;
&lt;br /&gt;
The parsers are combined to a object hierarchy which defines the grammar. A string can then be parsed via the feature&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
parser.parse_string (&amp;quot;Some source&amp;quot;)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
on the root object.&lt;br /&gt;
&lt;br /&gt;
==Internal DSL==&lt;br /&gt;
Objects can be combined via features, but the easier way is to use the defined operators. For instance if we want to define the simple grammar&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
'a' 'b' 'c'*&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
we will simply write:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
a + b + (-c)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Where a, b, c are already defined as character parsers parsing the right character (PEG_CHARACTER). The '+' operator concatenates the parsers to a sequence (PEG_SEQUENCE), while the prefix operator '-' wraps c into a one or more parser (PEG_ONE_OR_MORE).&lt;br /&gt;
All the operators are:&lt;br /&gt;
&lt;br /&gt;
* binary '+': Sequence concatenation&lt;br /&gt;
* binary '|': Choice concatenation&lt;br /&gt;
* prefix '+': wraps one or more&lt;br /&gt;
* prefix '-': wraps zero or more&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Additionally there is the operator '|+' and the '|&amp;amp;' operator which act like the binary '+' operator. In contrast to it, they insert a &amp;lt;code&amp;gt;whitespace*&amp;lt;/code&amp;gt; (for '|+') or a &amp;lt;code&amp;gt;whitespace+&amp;lt;/code&amp;gt; (for '|&amp;amp;') parser between the two operands. As it is often needed it makes sense to define them as operators.&lt;br /&gt;
&lt;br /&gt;
Be aware of a common mistake in combination with the binary '|'/'+' operators. If for instance you define an identifier as:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
identifier := a_to_z + (- (a_to_z | underscore))&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
If you go on and define two new parsers based on the latter one:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
identifier2 := identifier + a&lt;br /&gt;
identifier3 := identifier + a + b&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
.. then you won't get the expected result. &amp;lt;code&amp;gt;identifier2&amp;lt;/code&amp;gt; reuses the Sequence instance of &amp;lt;code&amp;gt;identifier&amp;lt;/code&amp;gt;. So by adding &amp;lt;code&amp;gt;a&amp;lt;/code&amp;gt; to it we change the Sequence of identifier and do not generate a new Sequence. identifier3 will then use that corrupted identifier and modifies the &amp;lt;code&amp;gt;identifier&amp;lt;/code&amp;gt; even more. Finally &amp;lt;code&amp;gt;identifier2&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;identifier3&amp;lt;/code&amp;gt; point to the same instance:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
(identifier a a b)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
To prevent this problem identifier has to be fixated:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
identifier.fixate&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Building a domain model==&lt;br /&gt;
A domain model can be directly created while parsing most of the times and doesn't have to be derived from the AST. With this implementation it can be achieved by defining builder agents on the various parser fragments.&lt;br /&gt;
To show its workings we will look at an example grammar for a definition of a &amp;quot;list language&amp;quot;:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
'(' identifier (',' identifier)* ')'&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
We assume that identifier is already defined.&lt;br /&gt;
The corresponding parser in the parser syntax would be&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
list := open_parenthesis + identifier + (- (comma + identifier)) + close_parenthesis&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
No we can define a feature on identifier which builds a list item and one on list which creates a list with the items:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
list.set_behaviour (agent build_list)&lt;br /&gt;
identifier.set_behaviour (agent build_list_item)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
The implementation of those are the following:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
build_list_item (a_result: PEG_PARSER_RESULT): PEG_PARSER_RESULT&lt;br /&gt;
		-- Builds a value attribute&lt;br /&gt;
	local&lt;br /&gt;
		l_list_item: LIST_ITEM&lt;br /&gt;
	do&lt;br /&gt;
		Result := a_result&lt;br /&gt;
		create l_list_item.make&lt;br /&gt;
		if attached {STRING} Result.internal_result.first as l_name then&lt;br /&gt;
			l_list_item.name := l_name&lt;br /&gt;
		end&lt;br /&gt;
		Result.replace_result (l_list_item)&lt;br /&gt;
	end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
build_list (a_result: PEG_PARSER_RESULT): PEG_PARSER_RESULT&lt;br /&gt;
		-- Builds a value attribute&lt;br /&gt;
	do&lt;br /&gt;
		Result := a_result&lt;br /&gt;
		Result.replace_result (Result.internal_result)&lt;br /&gt;
	end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Error Handling ==&lt;br /&gt;
To fix source code we need to output syntax errors detected in the parsing process. After every parsing with the parse_string feature we get a PEG_PARSING_RESULT with all the information we need.&lt;br /&gt;
On the one hand there is the above mentioned internal_result which is a list of domain models (possibly empty). On the other hand the PEG_PARSING_RESULT object tells you if and where an error occurred.&lt;br /&gt;
There are two different cases of a failure: either the parser failed on a character expecting an other one and thus flagging the parsing result as a failure. Or it didn't fail but some of the source code has not been parsed, so only a part of the code is valid.&lt;br /&gt;
In the first case we can find out where the syntax lies by inquiring longest_match_line_row:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
l_result.longest_match_line_row&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
This feature returns the line and row where the parser failed in a &amp;lt;code&amp;gt;TUPLE [line, row: INTEGER]&amp;lt;/code&amp;gt;.&lt;br /&gt;
For the second scenario we have to check if the string left to parse is empty:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
l_result.left_to_parse.is_empty&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
If it is empty everything could be parsed. Otherwise we will find the location where the parsing ended with the same &amp;lt;code&amp;gt;l_result.longest_match_line_row&amp;lt;/code&amp;gt; as before.&lt;br /&gt;
===Advanced error handling===&lt;br /&gt;
Most of the times source code can have semantic errors which can't be detected directly via the syntax. There is the possibility of analyzing the domain model ''after'' it has been generated. With PEGs we can directly interfere with the parsing process and add errors/warnings to the output (&amp;lt;code&amp;gt;PEG_PARSER_RESULT&amp;lt;/code&amp;gt;).&lt;br /&gt;
If we have the building agents defined we can validate them in the same feature. As an example we take the previously defined list grammar and expand it by raising an error and stopping the parsing process, if the name is not in the database (assuming there is a database of names):&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
build_list_item (a_result: PEG_PARSER_RESULT): PEG_PARSER_RESULT&lt;br /&gt;
		-- Builds a value attribute&lt;br /&gt;
	local&lt;br /&gt;
		l_list_item: LIST_ITEM&lt;br /&gt;
	do&lt;br /&gt;
		Result := a_result&lt;br /&gt;
		create l_list_item.make&lt;br /&gt;
		if attached {STRING} Result.internal_result.first as l_name then&lt;br /&gt;
			if database.has (l_name)&lt;br /&gt;
				l_list_item.name := l_name&lt;br /&gt;
			else&lt;br /&gt;
				Result.put_error_message (&amp;quot;Name &amp;quot; + l_name + &amp;quot; is not in database!&amp;quot;) -- Add an error&lt;br /&gt;
				Result.success := False -- Stop the parsing process (of this branch)&lt;br /&gt;
			end&lt;br /&gt;
		else&lt;br /&gt;
			Result.put_error_message (&amp;quot;Name is not valid!&amp;quot;) -- This line should actually never be executed&lt;br /&gt;
		end&lt;br /&gt;
		Result.replace_result (l_list_item)&lt;br /&gt;
	end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
==Debugging the parser==&lt;br /&gt;
Mostly, while building a parser, we want to know what exactly is being parsed and why for instance the parse process failed. For this purpose the debug option &amp;quot;peg&amp;quot; can be activated in Eiffel Studio.&lt;br /&gt;
Now when you try to parse a string you will always see a short serialization of the current parser, the current character and the string left to parse.&lt;br /&gt;
While this is useful, in big grammars it is difficult to keep an overview and we may not know where we are in the grammar. That's why parsers can have a 'name'. The name is display instead of the serialization and helps navigate the &amp;quot;parsing stack&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
identifier.set_name (&amp;quot;identifier&amp;quot;)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Sandrod</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=Xebra_Tag_Attribute&amp;diff=13236</id>
		<title>Xebra Tag Attribute</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=Xebra_Tag_Attribute&amp;diff=13236"/>
				<updated>2009-08-21T19:34:09Z</updated>
		
		<summary type="html">&lt;p&gt;Sandrod: /* Tag Attributes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Xebra]]&lt;br /&gt;
[[Xebra About|About]] | [[Xebra Installation|Installation]] |  [[Xebra Documentation|Documentation]] |  [[Xebra Tutorial|Tutorials]] | [[Xebra FAQ|Frequently Asked Questions]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Tag Attributes==&lt;br /&gt;
While most tag attributes are plain text and thus static, sometimes it is useful or even necessary to use dynamically bound attributes.&lt;br /&gt;
In Xebra there are two different types of dynamic attributes:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Tag&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
... attr=&amp;quot;%=call%&amp;quot;...&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
Call designates a controller feature which returns an instance of a certain type.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
... attr=&amp;quot;#{variable.name}&amp;quot;...&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
Uses a - predefined (form/iterate) - variable to retrieve a value.&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Sandrod</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=Xebra_Create_Tag_Library&amp;diff=13235</id>
		<title>Xebra Create Tag Library</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=Xebra_Create_Tag_Library&amp;diff=13235"/>
				<updated>2009-08-21T19:27:38Z</updated>
		
		<summary type="html">&lt;p&gt;Sandrod: /* Adding Tags */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This tutorial shows you how you can create a tag library for your own needs. It makes sense to add a custom library if some functionality recurs in your project(s). We will create a simple tag library (&amp;quot;font&amp;quot;) with a tag with the ability to format text as bold (bold).&lt;br /&gt;
&lt;br /&gt;
=Setting up=&lt;br /&gt;
Every tag library needs a unique namespace (like ''xeb'' or ''page''). We create a folder in $FONT_TAG_LIBRARY where we put all our configuration and tag library files.&lt;br /&gt;
The API of our tag library is defined in a file called config.taglib and has to be located in $FONT_TAG_LIBRARY. Since we don't have any tags yet, the file will just contain a skeleton:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;taglib id=&amp;quot;font&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/taglib&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With this configuration we created a tag library with the namespace &amp;quot;font&amp;quot; and no tags.&lt;br /&gt;
Since tag libraries are used as libraries we need to add a font_tag_library.ecf in the same folder as well:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;ISO-8859-1&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;system xmlns=&amp;quot;http://www.eiffel.com/developers/xml/configuration-1-5-0&amp;quot; xmlns:xsi=&amp;quot;http://www.w3.org/2001/XMLSchema-instance&amp;quot; xsi:schemaLocation=&amp;quot;http://www.eiffel.com/developers/xml/configuration-1-5-0 http://www.eiffel.com/developers/xml/configuration-1-5-0.xsd&amp;quot; name=&amp;quot;font_tag_library&amp;quot; uuid=&amp;quot;491B4344-79AF-43CB-891B-47EDEAC11056&amp;quot; library_target=&amp;quot;font_tag_library&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;target name=&amp;quot;font_tag_library&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;root all_classes=&amp;quot;true&amp;quot;/&amp;gt;&lt;br /&gt;
		&amp;lt;option full_class_checking=&amp;quot;true&amp;quot; syntax=&amp;quot;transitional&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;assertions precondition=&amp;quot;true&amp;quot; postcondition=&amp;quot;true&amp;quot; check=&amp;quot;true&amp;quot; invariant=&amp;quot;true&amp;quot; loop=&amp;quot;true&amp;quot; supplier_precondition=&amp;quot;true&amp;quot;/&amp;gt;&lt;br /&gt;
		&amp;lt;/option&amp;gt;&lt;br /&gt;
		&amp;lt;library name=&amp;quot;base&amp;quot; location=&amp;quot;$ISE_LIBRARY\library\base\base.ecf&amp;quot;/&amp;gt;&lt;br /&gt;
		&amp;lt;library name=&amp;quot;xebra_ast_elements&amp;quot; location=&amp;quot;$XEBRA_DEV\eiffel_projects\library\xebra_ast_elements\xebra_ast_elements-voidunsafe.ecf&amp;quot;/&amp;gt;&lt;br /&gt;
		&amp;lt;library name=&amp;quot;xebra_tags&amp;quot; location=&amp;quot;$XEBRA_DEV\eiffel_projects\library\xebra_tags\xebra_tags-voidunsafe.ecf&amp;quot;/&amp;gt;&lt;br /&gt;
		&amp;lt;library name=&amp;quot;xebra_utilities&amp;quot; location=&amp;quot;$XEBRA_DEV\eiffel_projects\library\xebra_utilities\xebra_utilities-voidunsafe.ecf&amp;quot;/&amp;gt;&lt;br /&gt;
		&amp;lt;cluster name=&amp;quot;font_tag_library&amp;quot; location=&amp;quot;.\&amp;quot; recursive=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;file_rule&amp;gt;&lt;br /&gt;
				&amp;lt;exclude&amp;gt;/EIFGENs$&amp;lt;/exclude&amp;gt;&lt;br /&gt;
				&amp;lt;exclude&amp;gt;/.svn$&amp;lt;/exclude&amp;gt;&lt;br /&gt;
				&amp;lt;exclude&amp;gt;/CVS$&amp;lt;/exclude&amp;gt;&lt;br /&gt;
			&amp;lt;/file_rule&amp;gt;&lt;br /&gt;
		&amp;lt;/cluster&amp;gt;&lt;br /&gt;
	&amp;lt;/target&amp;gt;&lt;br /&gt;
&amp;lt;/system&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Adding Tags=&lt;br /&gt;
To add our boldifying tag we need to add it to the config.taglib on the one hand and implement an eiffel class representing it on the other.&lt;br /&gt;
The config.taglib looks like this now:&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;taglib id=&amp;quot;xeb&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;tag id=&amp;quot;bold&amp;quot; class=&amp;quot;FONT_BOLD_TAG&amp;quot;&amp;gt;		&lt;br /&gt;
        &amp;lt;attribute id=&amp;quot;text&amp;quot; optional=&amp;quot;True&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/tag&amp;gt;&lt;br /&gt;
&amp;lt;/taglib&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
Note that we added a argument to the tag: ''text''. It is defined to be optional, so there is a default value for it. The corresponding class is defined with ''class'', in this case ''FONT_BOLD_TAG''.&lt;br /&gt;
The latter has to inherit from XTAG_TAG_SERIALIZER and implement a few features. In our example:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
class&lt;br /&gt;
	FONT_BOLD_TAG&lt;br /&gt;
&lt;br /&gt;
inherit&lt;br /&gt;
	XTAG_TAG_SERIALIZER&lt;br /&gt;
		redefine&lt;br /&gt;
			generates_render&lt;br /&gt;
		end&lt;br /&gt;
&lt;br /&gt;
create&lt;br /&gt;
	make&lt;br /&gt;
&lt;br /&gt;
feature -- Initialization&lt;br /&gt;
&lt;br /&gt;
	make&lt;br /&gt;
			--&lt;br /&gt;
		do&lt;br /&gt;
			make_base&lt;br /&gt;
			create {XTAG_TAG_VALUE_ARGUMENT} text.make (&amp;quot;default_text&amp;quot;)&lt;br /&gt;
		end&lt;br /&gt;
&lt;br /&gt;
feature -- Access&lt;br /&gt;
&lt;br /&gt;
	text: XTAG_TAG_ARGUMENT&lt;br /&gt;
			-- The text which should be displayed bold&lt;br /&gt;
&lt;br /&gt;
	bold: detachable XTAG_TAG_ARGUMENT&lt;br /&gt;
			-- Should it be displayed bold?&lt;br /&gt;
&lt;br /&gt;
feature -- Implementation&lt;br /&gt;
&lt;br /&gt;
	internal_generate (a_servlet_class: XEL_SERVLET_CLASS_ELEMENT; a_variable_table: HASH_TABLE [ANY, STRING])&lt;br /&gt;
			-- &amp;lt;Precursor&amp;gt;&lt;br /&gt;
		do&lt;br /&gt;
			a_servlet_class.render_html_page.&lt;br /&gt;
				append_output_expression &lt;br /&gt;
					(&amp;quot;&amp;lt;b&amp;gt;%&amp;quot;&amp;quot; + text.value (current_controller_id) + &amp;quot;%&amp;quot;&amp;lt;/b&amp;gt;&amp;quot;)&lt;br /&gt;
		end&lt;br /&gt;
&lt;br /&gt;
	internal_put_attribute (a_id: STRING; a_attribute: XTAG_TAG_ARGUMENT)&lt;br /&gt;
			-- &amp;lt;Precursor&amp;gt;&lt;br /&gt;
		do&lt;br /&gt;
			if id.is_equal (&amp;quot;text&amp;quot;) then&lt;br /&gt;
				text := a_attribute&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
&lt;br /&gt;
	generates_render: BOOLEAN = True&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
For our tag we needed to implement the two features ''internal_generate'' and ''internal_put_attribute''. The former has the task to generate all code in the servlet. In our case this is a print on the HTML result. The latter - ''internal_put_attribute'' - handles attributes of the tag. Here we just read the value and save it into ''text'' for further reuse in the rendering.&lt;br /&gt;
Finally we redefined ''generates_render''. This tells the generator that the tag creates expressions in the render feature. This feature redefinition is not needed, but will add debug information in the generated servlet file.&lt;/div&gt;</summary>
		<author><name>Sandrod</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=Xebra_Taglib_Form&amp;diff=13234</id>
		<title>Xebra Taglib Form</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=Xebra_Taglib_Form&amp;diff=13234"/>
				<updated>2009-08-21T19:10:10Z</updated>
		
		<summary type="html">&lt;p&gt;Sandrod: /* Form */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Xebra]]&lt;br /&gt;
[[Xebra About|About]] | [[Xebra Installation|Installation]] |  [[Xebra Documentation|Documentation]] |  [[Xebra Tutorial|Tutorials]] | [[Xebra FAQ|Frequently Asked Questions]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The Form Tag Library captures all the functionality related to html forms. This includes automatic wrapping of input to objects and validation.&lt;br /&gt;
&lt;br /&gt;
===Form===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Tag&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;f:form class=&amp;quot;...&amp;quot; variable=&amp;quot;...&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/f:form&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
All form tags have to be contained in a f-form. A variable and class can be optionally defined to automatically wrap input forms to an object. This variable is known in the scope of the form. Note that forms cannot be nested, as in normal xhtml forms.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;f:button text=&amp;quot;...&amp;quot; action=&amp;quot;...&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
A button is a normal html button. It is associated with a controller function (&amp;quot;action&amp;quot;) which is executed if the validation of all inputs field where successful. The automatically wrapped object is then passed to the action. The text designates the Label on the button.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;f:input_text value=&amp;quot;...&amp;quot; name=&amp;quot;...&amp;quot; text=&amp;quot;...&amp;quot; type=&amp;quot;...&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
The designated normal html inputs. Additionally they provide a name which makes them identifiable for validation output. f-validator tags can be added to the inputs to define validators as in all wrappable inputs. The type argument is optional and defines the type of the input (for instance 'secret').&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;f:textarea value=&amp;quot;...&amp;quot; name=&amp;quot;...&amp;quot; text=&amp;quot;...&amp;quot; rows=&amp;quot;...&amp;quot; cols=&amp;quot;...&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
Basically the same as the input fields but with some additional auxiliary textarea-specific attributes (rows, cols).&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;f:drop_down_list items=&amp;quot;...&amp;quot; name=&amp;quot;...&amp;quot; value=&amp;quot;...&amp;quot; [label=&amp;quot;...&amp;quot;]/&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
This tag generates the equivalent to a &amp;lt;xml&amp;gt;&amp;lt;select&amp;gt;&amp;lt;option&amp;gt;...&amp;lt;/option&amp;gt;...&amp;lt;/select&amp;gt;&amp;lt;/xml&amp;gt; statement. items designates the list to be used in the drop down and type is an optional parameter. It defines the type of the items. If not set, it assumes Strings.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;f:check_box name=&amp;quot;...&amp;quot; label=&amp;quot;..&amp;quot; value=&amp;quot;...&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
A normal checkbox which is automatically wrapped to a boolean.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;f:command_link label=&amp;quot;...&amp;quot; action=&amp;quot;...&amp;quot; variable=&amp;quot;...&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
A command link is a html link. It acts though like a button and executes the defined action on the controller. If a variable is defined, it will be passed to the action (feature). Variable names can be used from f-form or xeb-iterate.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;f:validator class=&amp;quot;...&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
A validator validates an input. It can be added to input fields (or textareas) to check the input.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;f:validation_result name=&amp;quot;...&amp;quot; variable=&amp;quot;...&amp;quot;&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/f:validation_result&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
Stores a variable with the name of the variable attribute. It contains the error message. If there is more than one error it iterates over all errors. In this way formatting of errors is (almost) free to the designer.&lt;br /&gt;
|}&lt;br /&gt;
====Example====&lt;br /&gt;
For the forms framework we will use a simple display of reservations with an input mask and delete command links.&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
	&amp;lt;tr&amp;gt;&lt;br /&gt;
		&amp;lt;td&amp;gt;Name&amp;lt;/td&amp;gt;&lt;br /&gt;
		&amp;lt;td&amp;gt;Date&amp;lt;/td&amp;gt;&lt;br /&gt;
		&amp;lt;td&amp;gt;Persons&amp;lt;/td&amp;gt;&lt;br /&gt;
		&amp;lt;xeb:container render=&amp;quot;authenticated_admin&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;td&amp;gt;Delete&amp;lt;/td&amp;gt;&lt;br /&gt;
		&amp;lt;/xeb:container&amp;gt;&lt;br /&gt;
		&amp;lt;xeb:container render=&amp;quot;not_authenticated_admin&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;td&amp;gt;Details&amp;lt;/td&amp;gt;&lt;br /&gt;
		&amp;lt;/xeb:container&amp;gt;&lt;br /&gt;
	&amp;lt;/tr&amp;gt;&lt;br /&gt;
	&amp;lt;f:form&amp;gt;&lt;br /&gt;
	&amp;lt;xeb:iterate list=&amp;quot;global_state.db.reservations&amp;quot; variable=&amp;quot;reservation&amp;quot; type=&amp;quot;RESERVATION&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;tr&amp;gt;&lt;br /&gt;
			&amp;lt;td&amp;gt;&amp;lt;xeb:display feature=&amp;quot;#{reservation.name}&amp;quot;/&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
			&amp;lt;td&amp;gt;&amp;lt;xeb:display feature=&amp;quot;#{reservation.date}&amp;quot;/&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
			&amp;lt;td&amp;gt;&lt;br /&gt;
			&amp;lt;f:command_link label=&amp;quot;Delete&amp;quot; action=&amp;quot;delete&amp;quot; variable=&amp;quot;reservation&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;/td&amp;gt;					&lt;br /&gt;
		&amp;lt;/tr&amp;gt;&lt;br /&gt;
	&amp;lt;/xeb:iterate&amp;gt;&lt;br /&gt;
	&amp;lt;/f:form&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;h2&amp;gt;New Reservation&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;f:form variable=&amp;quot;new_reservation&amp;quot; class=&amp;quot;RESERVATION&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
	&amp;lt;tr&amp;gt;&lt;br /&gt;
		&amp;lt;td&amp;gt;Name&amp;lt;/td&amp;gt;&lt;br /&gt;
		&amp;lt;td&amp;gt;&amp;lt;f:input_text value=&amp;quot;name&amp;quot; name=&amp;quot;a_name&amp;quot; text=&amp;quot;#{new_reservation.name}&amp;quot; /&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
	&amp;lt;/tr&amp;gt;&lt;br /&gt;
	&amp;lt;tr&amp;gt;&lt;br /&gt;
		&amp;lt;td&amp;gt;Date&amp;lt;/td&amp;gt;&lt;br /&gt;
		&amp;lt;td&amp;gt;&amp;lt;f:input_text value=&amp;quot;date&amp;quot; name=&amp;quot;a_date&amp;quot; text=&amp;quot;#{new_reservation.date}&amp;quot; /&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
	&amp;lt;/tr&amp;gt;&lt;br /&gt;
	&amp;lt;tr&amp;gt;&lt;br /&gt;
		&amp;lt;td colspan=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;f:button value=&amp;quot;Save&amp;quot; action=&amp;quot;save&amp;quot; type=&amp;quot;submit&amp;quot; /&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
		&amp;lt;/td&amp;gt;&lt;br /&gt;
	&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/f:form&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;/div&gt;</summary>
		<author><name>Sandrod</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=Xebra_Taglib_Xeb&amp;diff=13233</id>
		<title>Xebra Taglib Xeb</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=Xebra_Taglib_Xeb&amp;diff=13233"/>
				<updated>2009-08-21T19:06:13Z</updated>
		
		<summary type="html">&lt;p&gt;Sandrod: /* Xeb */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Xebra]]&lt;br /&gt;
[[Xebra About|About]] | [[Xebra Installation|Installation]] |  [[Xebra Documentation|Documentation]] |  [[Xebra Tutorial|Tutorials]] | [[Xebra FAQ|Frequently Asked Questions]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The Xebra Tag Library is a container for the more mundane, simple tags which are used almost everywhere. They include loops, calls to the controller and other basic functionality.&lt;br /&gt;
&lt;br /&gt;
===Xeb===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Tag&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;xeb:call feature=&amp;quot;...&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
Calls the feature on the controller on render-time.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;xeb:loop times=&amp;quot;...&amp;quot; &amp;gt;&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/xeb:loop&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
Loops its content &amp;quot;times&amp;quot; times.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;xeb:redirect url=&amp;quot;...&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
Redirects the server to a new page at &amp;quot;url&amp;quot;. The redirect is done server internally.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;xeb:iterate list=&amp;quot;...&amp;quot; variable=&amp;quot;...&amp;quot; type=&amp;quot;...&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/xeb:iterate&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
Iterates over a list (defined with &amp;quot;list&amp;quot; as a controller call). The current item is stored in &amp;quot;variable&amp;quot; which is of type &amp;quot;type&amp;quot;.  This variable is known in the scope of the iterate tag.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;xeb:container&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/xeb:container&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
This simple tag just groups parts of the site. Can be used to conditionally render some parts with the &amp;quot;render&amp;quot; attribute.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;xeb:display text=&amp;quot;...&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
The display tag simply displays what is written in feature.&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Sandrod</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=Xebra_Taglib_Page&amp;diff=13232</id>
		<title>Xebra Taglib Page</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=Xebra_Taglib_Page&amp;diff=13232"/>
				<updated>2009-08-21T19:04:04Z</updated>
		
		<summary type="html">&lt;p&gt;Sandrod: /* Page */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Xebra]]&lt;br /&gt;
[[Xebra About|About]] | [[Xebra Installation|Installation]] |  [[Xebra Documentation|Documentation]] |  [[Xebra Tutorial|Tutorials]] | [[Xebra FAQ|Frequently Asked Questions]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Page===&lt;br /&gt;
The ''page'' libraries consists of the core tags needed for page configuration and composition. The Tags are:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Tag&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;page:controller class=&amp;quot;...&amp;quot; create=&amp;quot;...&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
Defines the controller which should be used for the ''xeb'' page. The optional 'create' attribute defines the name of the creation procedure. 'default_create' is used by default.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;page:declare_region id=&amp;quot;...&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
Declares a region at the specific point in the ''xeb'' page where including pages can add specific html code.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;page:define_region id=&amp;quot;...&amp;quot;&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/page:define_region&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
Can only be used inside a page-include tag. Will insert the content into the templates regions (with the same id). See page-include.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;page:include id=&amp;quot;...&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
Includes an other xeb page. If the included page has declare-region tags they have to be implemented with define-region tags.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;/page:fragment&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
If used the page is not transformed to a servlet.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Example====&lt;br /&gt;
&lt;br /&gt;
This example shows the workings of the template framework. It consists of a master page which acts as a template and three different types of usage of this template.&lt;br /&gt;
&lt;br /&gt;
'''master.xeb'''&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
&amp;lt;page:controller class=&amp;quot;DEFAULT_CONTROLLER&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;body&amp;gt;&lt;br /&gt;
&amp;lt;h1&amp;gt;&lt;br /&gt;
&amp;lt;page:declare_region id=&amp;quot;greeting&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;page:declare_region id=&amp;quot;form&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/body&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The master page is &amp;quot;deferred&amp;quot;, since there are page:declare_region tags. The translator detects the undefined regions and doesn't generate a servlet from this xeb file.&lt;br /&gt;
&lt;br /&gt;
'''slave1.xeb'''&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;page:include template=&amp;quot;master&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;page:define_region id=&amp;quot;greeting&amp;quot;&amp;gt;&lt;br /&gt;
Hello, I'm Slave 1&lt;br /&gt;
&amp;lt;/page:define_region&amp;gt;&lt;br /&gt;
&amp;lt;page:define_region id=&amp;quot;form&amp;quot;&amp;gt;&lt;br /&gt;
Other region&lt;br /&gt;
&amp;lt;/page:define_region&amp;gt;&lt;br /&gt;
&amp;lt;/page:include&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
&lt;br /&gt;
slave1.xeb uses master.xeb as a template and includes it via the page-include tag. Since master.xeb declares two regions, slave1 defines them. The content of the define-region tags are inserted at the locations of the respective declare-region tags of the template. From this xeb file a servlet is generated.&lt;br /&gt;
Additionally since it's not declaring any controller all controller calls are redirected to the ones in the template.&lt;br /&gt;
&lt;br /&gt;
'''slave2.xeb'''&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;page:include template=&amp;quot;master&amp;quot;&lt;br /&gt;
&amp;lt;page:define_region id=&amp;quot;form&amp;quot;&amp;gt;&lt;br /&gt;
Other region 2&lt;br /&gt;
&amp;lt;/page:define_region&amp;gt;&lt;br /&gt;
&amp;lt;/page:include&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
Templates can also be just imported partially. In slave2.xeb just the &amp;quot;form&amp;quot;-part of the template is implemented. This means that slave2.xeb is itself a template and will not be translated to a servlet.&lt;br /&gt;
&lt;br /&gt;
slave3.xeb&lt;br /&gt;
&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;page:include template=&amp;quot;slave2.xeb&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;page:define_region id=&amp;quot;greetings&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/page:define_region&amp;gt;&lt;br /&gt;
&amp;lt;/page:include&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
This last example uses slave2.xeb as a template, which has one remaining region to implement: &amp;quot;greetings. The controller is still inherited from master.xeb, that is, controllers are transitive.&lt;br /&gt;
&lt;br /&gt;
With these techniques we would be able to minimize duplicated code and hence errors in the xeb files, which are difficult to debug.&lt;/div&gt;</summary>
		<author><name>Sandrod</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=Xebra_Taglib_Page&amp;diff=13231</id>
		<title>Xebra Taglib Page</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=Xebra_Taglib_Page&amp;diff=13231"/>
				<updated>2009-08-21T19:03:25Z</updated>
		
		<summary type="html">&lt;p&gt;Sandrod: /* Page */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Xebra]]&lt;br /&gt;
[[Xebra About|About]] | [[Xebra Installation|Installation]] |  [[Xebra Documentation|Documentation]] |  [[Xebra Tutorial|Tutorials]] | [[Xebra FAQ|Frequently Asked Questions]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Page===&lt;br /&gt;
The ''page'' libraries consists of the core tags needed for page configuration and composition. The Tags are:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Tag&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;page:controller class=&amp;quot;...&amp;quot; create=&amp;quot;...&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
Defines the controller which should be used for the ''xeb'' page. The optional 'create' attribute defines the name of the creation procedure.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;page:declare_region id=&amp;quot;...&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
Declares a region at the specific point in the ''xeb'' page where including pages can add specific html code.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;page:define_region id=&amp;quot;...&amp;quot;&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/page:define_region&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
Can only be used inside a page-include tag. Will insert the content into the templates regions (with the same id). See page-include.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;page:include id=&amp;quot;...&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
Includes an other xeb page. If the included page has declare-region tags they have to be implemented with define-region tags.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;/page:fragment&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
If used the page is not transformed to a servlet.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Example====&lt;br /&gt;
&lt;br /&gt;
This example shows the workings of the template framework. It consists of a master page which acts as a template and three different types of usage of this template.&lt;br /&gt;
&lt;br /&gt;
'''master.xeb'''&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
&amp;lt;page:controller class=&amp;quot;DEFAULT_CONTROLLER&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;body&amp;gt;&lt;br /&gt;
&amp;lt;h1&amp;gt;&lt;br /&gt;
&amp;lt;page:declare_region id=&amp;quot;greeting&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;page:declare_region id=&amp;quot;form&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/body&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The master page is &amp;quot;deferred&amp;quot;, since there are page:declare_region tags. The translator detects the undefined regions and doesn't generate a servlet from this xeb file.&lt;br /&gt;
&lt;br /&gt;
'''slave1.xeb'''&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;page:include template=&amp;quot;master&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;page:define_region id=&amp;quot;greeting&amp;quot;&amp;gt;&lt;br /&gt;
Hello, I'm Slave 1&lt;br /&gt;
&amp;lt;/page:define_region&amp;gt;&lt;br /&gt;
&amp;lt;page:define_region id=&amp;quot;form&amp;quot;&amp;gt;&lt;br /&gt;
Other region&lt;br /&gt;
&amp;lt;/page:define_region&amp;gt;&lt;br /&gt;
&amp;lt;/page:include&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
&lt;br /&gt;
slave1.xeb uses master.xeb as a template and includes it via the page-include tag. Since master.xeb declares two regions, slave1 defines them. The content of the define-region tags are inserted at the locations of the respective declare-region tags of the template. From this xeb file a servlet is generated.&lt;br /&gt;
Additionally since it's not declaring any controller all controller calls are redirected to the ones in the template.&lt;br /&gt;
&lt;br /&gt;
'''slave2.xeb'''&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;page:include template=&amp;quot;master&amp;quot;&lt;br /&gt;
&amp;lt;page:define_region id=&amp;quot;form&amp;quot;&amp;gt;&lt;br /&gt;
Other region 2&lt;br /&gt;
&amp;lt;/page:define_region&amp;gt;&lt;br /&gt;
&amp;lt;/page:include&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
Templates can also be just imported partially. In slave2.xeb just the &amp;quot;form&amp;quot;-part of the template is implemented. This means that slave2.xeb is itself a template and will not be translated to a servlet.&lt;br /&gt;
&lt;br /&gt;
slave3.xeb&lt;br /&gt;
&lt;br /&gt;
&amp;lt;xml&amp;gt;&lt;br /&gt;
&amp;lt;page:include template=&amp;quot;slave2.xeb&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;page:define_region id=&amp;quot;greetings&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/page:define_region&amp;gt;&lt;br /&gt;
&amp;lt;/page:include&amp;gt;&lt;br /&gt;
&amp;lt;/xml&amp;gt;&lt;br /&gt;
This last example uses slave2.xeb as a template, which has one remaining region to implement: &amp;quot;greetings. The controller is still inherited from master.xeb, that is, controllers are transitive.&lt;br /&gt;
&lt;br /&gt;
With these techniques we would be able to minimize duplicated code and hence errors in the xeb files, which are difficult to debug.&lt;/div&gt;</summary>
		<author><name>Sandrod</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=PEG_Library&amp;diff=13196</id>
		<title>PEG Library</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=PEG_Library&amp;diff=13196"/>
				<updated>2009-08-19T21:39:56Z</updated>
		
		<summary type="html">&lt;p&gt;Sandrod: /* Debugging the parser */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page describes the Parsing Expression Library implementation for Eiffel. Information about PEGs can be found here [http://en.wikipedia.org/wiki/Parsing_expression_grammar].&lt;br /&gt;
&lt;br /&gt;
==Basic classes==&lt;br /&gt;
All parsers inherit from PEG_ABSTRACT_PEG which defines the common functionalities. The parsers are the same as in the definition of Wikipedia with additional classes like whitespace support.&lt;br /&gt;
&lt;br /&gt;
The parsers are combined to a object hierarchy which defines the grammar. A string can then be parsed via the feature&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
parser.parse_string (&amp;quot;Some source&amp;quot;)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
on the root object.&lt;br /&gt;
&lt;br /&gt;
==Internal DSL==&lt;br /&gt;
Objects can be combined via features, but the easier way is to use the defined operators. For instance if we want to define the simple grammar&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
'a' 'b' 'c'*&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
we will simply write:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
a + b + (-c)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Where a, b, c are already defined as character parsers parsing the right character (PEG_CHARACTER). The '+' operator concatenates the parsers to a sequence (PEG_SEQUENCE), while the prefix operator '-' wraps c into a one or more parser (PEG_ONE_OR_MORE).&lt;br /&gt;
All the operators are:&lt;br /&gt;
&lt;br /&gt;
* binary '+': Sequence concatenation&lt;br /&gt;
* binary '|': Choice concatenation&lt;br /&gt;
* prefix '+': wraps one or more&lt;br /&gt;
* prefix '-': wraps zero or more&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Additionally there is the operator '|+' which acts like the binary '+' operator. In contrast to it, it inserts a &amp;lt;code&amp;gt;whitespace*&amp;lt;/code&amp;gt; parser between the two operands. As it is often needed it makes sense to define it as an operator.&lt;br /&gt;
&lt;br /&gt;
Be aware of a common mistake in combination with the binary '|'/'+' operators. If for instance you define an identifier as:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
identifier := a_to_z + (- (a_to_z | underscore))&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
If you go on and define two new parsers based on the latter one:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
identifier2 := identifier + a&lt;br /&gt;
identifier3 := identifier + a + b&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
.. then you won't get the expected result. &amp;lt;code&amp;gt;identifier2&amp;lt;/code&amp;gt; reuses the Sequence instance of &amp;lt;code&amp;gt;identifier&amp;lt;/code&amp;gt;. So by adding &amp;lt;code&amp;gt;a&amp;lt;/code&amp;gt; to it we change the Sequence of identifier and do not generate a new Sequence. identifier3 will then use that corrupted identifier and modifies the &amp;lt;code&amp;gt;identifier&amp;lt;/code&amp;gt; even more. Finally &amp;lt;code&amp;gt;identifier2&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;identifier3&amp;lt;/code&amp;gt; point to the same instance:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
(identifier a a b)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
To prevent this problem identifier has to be fixated:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
identifier.fixate&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Building a domain model==&lt;br /&gt;
A domain model can be directly created while parsing most of the times and doesn't have to be derived from the AST. With this implementation it can be achieved by defining builder agents on the various parser fragments.&lt;br /&gt;
To show its workings we will look at an example grammar for a definition of a &amp;quot;list language&amp;quot;:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
'(' identifier (',' identifier)* ')'&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
We assume that identifier is already defined.&lt;br /&gt;
The corresponding parser in the parser syntax would be&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
list := open_parenthesis + identifier + (- (comma + identifier)) + close_parenthesis&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
No we can define a feature on identifier which builds a list item and one on list which creates a list with the items:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
list.set_behaviour (agent build_list)&lt;br /&gt;
identifier.set_behaviour (agent build_list_item)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
The implementation of those are the following:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
build_list_item (a_result: PEG_PARSER_RESULT): PEG_PARSER_RESULT&lt;br /&gt;
		-- Builds a value attribute&lt;br /&gt;
	local&lt;br /&gt;
		l_list_item: LIST_ITEM&lt;br /&gt;
	do&lt;br /&gt;
		Result := a_result&lt;br /&gt;
		create l_list_item.make&lt;br /&gt;
		if attached {STRING} Result.internal_result.first as l_name then&lt;br /&gt;
			l_list_item.name := l_name&lt;br /&gt;
		end&lt;br /&gt;
		Result.replace_result (l_list_item)&lt;br /&gt;
	end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
build_list (a_result: PEG_PARSER_RESULT): PEG_PARSER_RESULT&lt;br /&gt;
		-- Builds a value attribute&lt;br /&gt;
	do&lt;br /&gt;
		Result := a_result&lt;br /&gt;
		Result.replace_result (Result.internal_result)&lt;br /&gt;
	end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Error Handling ==&lt;br /&gt;
To fix source code we need to output syntax errors detected in the parsing process. After every parsing with the parse_string feature we get a PEG_PARSING_RESULT with all the information we need.&lt;br /&gt;
On the one hand there is the above mentioned internal_result which is a list of domain models (possibly empty). On the other hand the PEG_PARSING_RESULT object tells you if and where an error occurred.&lt;br /&gt;
There are two different cases of a failure: either the parser failed on a character expecting an other one and thus flagging the parsing result as a failure. Or it didn't fail but some of the source code has not been parsed, so only a part of the code is valid.&lt;br /&gt;
In the first case we can find out where the syntax lies by inquiring longest_match_line_row:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
l_result.longest_match_line_row&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
This feature returns the line and row where the parser failed in a &amp;lt;code&amp;gt;TUPLE [line, row: INTEGER]&amp;lt;/code&amp;gt;.&lt;br /&gt;
For the second scenario we have to check if the string left to parse is empty:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
l_result.left_to_parse.is_empty&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
If it is empty everything could be parsed. Otherwise we will find the location where the parsing ended with the same &amp;lt;code&amp;gt;l_result.longest_match_line_row&amp;lt;/code&amp;gt; as before.&lt;br /&gt;
===Advanced error handling===&lt;br /&gt;
Most of the times source code can have semantic errors which can't be detected directly via the syntax. There is the possibility of analyzing the domain model ''after'' it has been generated. With PEGs we can directly interfere with the parsing process and add errors/warnings to the output (&amp;lt;code&amp;gt;PEG_PARSER_RESULT&amp;lt;/code&amp;gt;).&lt;br /&gt;
If we have the building agents defined we can validate them in the same feature. As an example we take the previously defined list grammar and expand it by raising an error and stopping the parsing process, if the name is not in the database (assuming there is a database of names):&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
build_list_item (a_result: PEG_PARSER_RESULT): PEG_PARSER_RESULT&lt;br /&gt;
		-- Builds a value attribute&lt;br /&gt;
	local&lt;br /&gt;
		l_list_item: LIST_ITEM&lt;br /&gt;
	do&lt;br /&gt;
		Result := a_result&lt;br /&gt;
		create l_list_item.make&lt;br /&gt;
		if attached {STRING} Result.internal_result.first as l_name then&lt;br /&gt;
			if database.has (l_name)&lt;br /&gt;
				l_list_item.name := l_name&lt;br /&gt;
			else&lt;br /&gt;
				Result.put_error_message (&amp;quot;Name &amp;quot; + l_name + &amp;quot; is not in database!&amp;quot;) -- Add an error&lt;br /&gt;
				Result.success := False -- Stop the parsing process (of this branch)&lt;br /&gt;
			end&lt;br /&gt;
		else&lt;br /&gt;
			Result.put_error_message (&amp;quot;Name is not valid!&amp;quot;) -- This line should actually never be executed&lt;br /&gt;
		end&lt;br /&gt;
		Result.replace_result (l_list_item)&lt;br /&gt;
	end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
==Debugging the parser==&lt;br /&gt;
Mostly, while building a parser, we want to know what exactly is being parsed and why for instance the parse process failed. For this purpose the debug option &amp;quot;peg&amp;quot; can be activated in Eiffel Studio.&lt;br /&gt;
Now when you try to parse a string you will always see a short serialization of the current parser, the current character and the string left to parse.&lt;br /&gt;
While this is useful, in big grammars it is difficult to keep an overview and we may not know where we are in the grammar. That's why parsers can have a 'name'. The name is display instead of the serialization and helps navigate the &amp;quot;parsing stack&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
identifier.set_name (&amp;quot;identifier&amp;quot;)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Sandrod</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=PEG_Library&amp;diff=13195</id>
		<title>PEG Library</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=PEG_Library&amp;diff=13195"/>
				<updated>2009-08-19T19:01:39Z</updated>
		
		<summary type="html">&lt;p&gt;Sandrod: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page describes the Parsing Expression Library implementation for Eiffel. Information about PEGs can be found here [http://en.wikipedia.org/wiki/Parsing_expression_grammar].&lt;br /&gt;
&lt;br /&gt;
==Basic classes==&lt;br /&gt;
All parsers inherit from PEG_ABSTRACT_PEG which defines the common functionalities. The parsers are the same as in the definition of Wikipedia with additional classes like whitespace support.&lt;br /&gt;
&lt;br /&gt;
The parsers are combined to a object hierarchy which defines the grammar. A string can then be parsed via the feature&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
parser.parse_string (&amp;quot;Some source&amp;quot;)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
on the root object.&lt;br /&gt;
&lt;br /&gt;
==Internal DSL==&lt;br /&gt;
Objects can be combined via features, but the easier way is to use the defined operators. For instance if we want to define the simple grammar&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
'a' 'b' 'c'*&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
we will simply write:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
a + b + (-c)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Where a, b, c are already defined as character parsers parsing the right character (PEG_CHARACTER). The '+' operator concatenates the parsers to a sequence (PEG_SEQUENCE), while the prefix operator '-' wraps c into a one or more parser (PEG_ONE_OR_MORE).&lt;br /&gt;
All the operators are:&lt;br /&gt;
&lt;br /&gt;
* binary '+': Sequence concatenation&lt;br /&gt;
* binary '|': Choice concatenation&lt;br /&gt;
* prefix '+': wraps one or more&lt;br /&gt;
* prefix '-': wraps zero or more&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Additionally there is the operator '|+' which acts like the binary '+' operator. In contrast to it, it inserts a &amp;lt;code&amp;gt;whitespace*&amp;lt;/code&amp;gt; parser between the two operands. As it is often needed it makes sense to define it as an operator.&lt;br /&gt;
&lt;br /&gt;
Be aware of a common mistake in combination with the binary '|'/'+' operators. If for instance you define an identifier as:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
identifier := a_to_z + (- (a_to_z | underscore))&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
If you go on and define two new parsers based on the latter one:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
identifier2 := identifier + a&lt;br /&gt;
identifier3 := identifier + a + b&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
.. then you won't get the expected result. &amp;lt;code&amp;gt;identifier2&amp;lt;/code&amp;gt; reuses the Sequence instance of &amp;lt;code&amp;gt;identifier&amp;lt;/code&amp;gt;. So by adding &amp;lt;code&amp;gt;a&amp;lt;/code&amp;gt; to it we change the Sequence of identifier and do not generate a new Sequence. identifier3 will then use that corrupted identifier and modifies the &amp;lt;code&amp;gt;identifier&amp;lt;/code&amp;gt; even more. Finally &amp;lt;code&amp;gt;identifier2&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;identifier3&amp;lt;/code&amp;gt; point to the same instance:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
(identifier a a b)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
To prevent this problem identifier has to be fixated:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
identifier.fixate&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Building a domain model==&lt;br /&gt;
A domain model can be directly created while parsing most of the times and doesn't have to be derived from the AST. With this implementation it can be achieved by defining builder agents on the various parser fragments.&lt;br /&gt;
To show its workings we will look at an example grammar for a definition of a &amp;quot;list language&amp;quot;:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
'(' identifier (',' identifier)* ')'&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
We assume that identifier is already defined.&lt;br /&gt;
The corresponding parser in the parser syntax would be&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
list := open_parenthesis + identifier + (- (comma + identifier)) + close_parenthesis&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
No we can define a feature on identifier which builds a list item and one on list which creates a list with the items:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
list.set_behaviour (agent build_list)&lt;br /&gt;
identifier.set_behaviour (agent build_list_item)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
The implementation of those are the following:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
build_list_item (a_result: PEG_PARSER_RESULT): PEG_PARSER_RESULT&lt;br /&gt;
		-- Builds a value attribute&lt;br /&gt;
	local&lt;br /&gt;
		l_list_item: LIST_ITEM&lt;br /&gt;
	do&lt;br /&gt;
		Result := a_result&lt;br /&gt;
		create l_list_item.make&lt;br /&gt;
		if attached {STRING} Result.internal_result.first as l_name then&lt;br /&gt;
			l_list_item.name := l_name&lt;br /&gt;
		end&lt;br /&gt;
		Result.replace_result (l_list_item)&lt;br /&gt;
	end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
build_list (a_result: PEG_PARSER_RESULT): PEG_PARSER_RESULT&lt;br /&gt;
		-- Builds a value attribute&lt;br /&gt;
	do&lt;br /&gt;
		Result := a_result&lt;br /&gt;
		Result.replace_result (Result.internal_result)&lt;br /&gt;
	end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Error Handling ==&lt;br /&gt;
To fix source code we need to output syntax errors detected in the parsing process. After every parsing with the parse_string feature we get a PEG_PARSING_RESULT with all the information we need.&lt;br /&gt;
On the one hand there is the above mentioned internal_result which is a list of domain models (possibly empty). On the other hand the PEG_PARSING_RESULT object tells you if and where an error occurred.&lt;br /&gt;
There are two different cases of a failure: either the parser failed on a character expecting an other one and thus flagging the parsing result as a failure. Or it didn't fail but some of the source code has not been parsed, so only a part of the code is valid.&lt;br /&gt;
In the first case we can find out where the syntax lies by inquiring longest_match_line_row:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
l_result.longest_match_line_row&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
This feature returns the line and row where the parser failed in a &amp;lt;code&amp;gt;TUPLE [line, row: INTEGER]&amp;lt;/code&amp;gt;.&lt;br /&gt;
For the second scenario we have to check if the string left to parse is empty:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
l_result.left_to_parse.is_empty&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
If it is empty everything could be parsed. Otherwise we will find the location where the parsing ended with the same &amp;lt;code&amp;gt;l_result.longest_match_line_row&amp;lt;/code&amp;gt; as before.&lt;br /&gt;
===Advanced error handling===&lt;br /&gt;
Most of the times source code can have semantic errors which can't be detected directly via the syntax. There is the possibility of analyzing the domain model ''after'' it has been generated. With PEGs we can directly interfere with the parsing process and add errors/warnings to the output (&amp;lt;code&amp;gt;PEG_PARSER_RESULT&amp;lt;/code&amp;gt;).&lt;br /&gt;
If we have the building agents defined we can validate them in the same feature. As an example we take the previously defined list grammar and expand it by raising an error and stopping the parsing process, if the name is not in the database (assuming there is a database of names):&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
build_list_item (a_result: PEG_PARSER_RESULT): PEG_PARSER_RESULT&lt;br /&gt;
		-- Builds a value attribute&lt;br /&gt;
	local&lt;br /&gt;
		l_list_item: LIST_ITEM&lt;br /&gt;
	do&lt;br /&gt;
		Result := a_result&lt;br /&gt;
		create l_list_item.make&lt;br /&gt;
		if attached {STRING} Result.internal_result.first as l_name then&lt;br /&gt;
			if database.has (l_name)&lt;br /&gt;
				l_list_item.name := l_name&lt;br /&gt;
			else&lt;br /&gt;
				Result.put_error_message (&amp;quot;Name &amp;quot; + l_name + &amp;quot; is not in database!&amp;quot;) -- Add an error&lt;br /&gt;
				Result.success := False -- Stop the parsing process (of this branch)&lt;br /&gt;
			end&lt;br /&gt;
		else&lt;br /&gt;
			Result.put_error_message (&amp;quot;Name is not valid!&amp;quot;) -- This line should actually never be executed&lt;br /&gt;
		end&lt;br /&gt;
		Result.replace_result (l_list_item)&lt;br /&gt;
	end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
==Debugging the parser==&lt;/div&gt;</summary>
		<author><name>Sandrod</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=PEG_Library&amp;diff=13194</id>
		<title>PEG Library</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=PEG_Library&amp;diff=13194"/>
				<updated>2009-08-19T19:00:20Z</updated>
		
		<summary type="html">&lt;p&gt;Sandrod: /* Internal DSL */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page describes the Parsing Expression Library implementation for Eiffel. Information about PEGs can be found here [http://en.wikipedia.org/wiki/Parsing_expression_grammar].&lt;br /&gt;
&lt;br /&gt;
==Basic classes==&lt;br /&gt;
All parsers inherit from PEG_ABSTRACT_PEG which defines the common functionalities. The parsers are the same as in the definition of Wikipedia with additional classes like whitespace support.&lt;br /&gt;
&lt;br /&gt;
The parsers are combined to a object hierarchy which defines the grammar. A string can then be parsed via the feature&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
parser.parse_string (&amp;quot;Some source&amp;quot;)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
on the root object.&lt;br /&gt;
&lt;br /&gt;
==Internal DSL==&lt;br /&gt;
Objects can be combined via features, but the easier way is to use the defined operators. For instance if we want to define the simple grammar&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
'a' 'b' 'c'*&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
we will simply write:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
a + b + (-c)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Where a, b, c are already defined as character parsers parsing the right character (PEG_CHARACTER). The '+' operator concatenates the parsers to a sequence (PEG_SEQUENCE), while the prefix operator '-' wraps c into a one or more parser (PEG_ONE_OR_MORE).&lt;br /&gt;
All the operators are:&lt;br /&gt;
&lt;br /&gt;
* binary '+': Sequence concatenation&lt;br /&gt;
* binary '|': Choice concatenation&lt;br /&gt;
* prefix '+': wraps one or more&lt;br /&gt;
* prefix '-': wraps zero or more&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Additionally there is the operator '|+' which acts like the binary '+' operator. In contrast to it, it inserts a &amp;lt;code&amp;gt;whitespace*&amp;lt;/code&amp;gt; parser between the two operands. As it is often needed it makes sense to define it as an operator.&lt;br /&gt;
&lt;br /&gt;
Be aware of a common mistake in combination with the binary '|'/'+' operators. If for instance you define an identifier as:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
identifier := a_to_z + (- (a_to_z | underscore))&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
If you go on and define two new parsers based on the latter one:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
identifier2 := identifier + a&lt;br /&gt;
identifier3 := identifier + a + b&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
.. then you won't get the expected result. &amp;lt;code&amp;gt;identifier2&amp;lt;/code&amp;gt; reuses the Sequence instance of &amp;lt;code&amp;gt;identifier&amp;lt;/code&amp;gt;. So by adding &amp;lt;code&amp;gt;a&amp;lt;/code&amp;gt; to it we change the Sequence of identifier and do not generate a new Sequence. identifier3 will then use that corrupted identifier and modifies the &amp;lt;code&amp;gt;identifier&amp;lt;/code&amp;gt; even more. Finally &amp;lt;code&amp;gt;identifier2&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;identifier3&amp;lt;/code&amp;gt; point to the same instance:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
(identifier a a b)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
To prevent this problem identifier has to be fixated:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
identifier.fixate&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Building a domain model==&lt;br /&gt;
A domain model can be directly created while parsing most of the times and doesn't have to be derived from the AST. With this implementation it can be achieved by defining builder agents on the various parser fragments.&lt;br /&gt;
To show its workings we will look at an example grammar for a definition of a &amp;quot;list language&amp;quot;:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
'(' identifier (',' identifier)* ')'&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
We assume that identifier is already defined.&lt;br /&gt;
The corresponding parser in the parser syntax would be&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
list := open_parenthesis + identifier + (- (comma + identifier)) + close_parenthesis&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
No we can define a feature on identifier which builds a list item and one on list which creates a list with the items:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
list.set_behaviour (agent build_list)&lt;br /&gt;
identifier.set_behaviour (agent build_list_item)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
The implementation of those are the following:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
build_list_item (a_result: PEG_PARSER_RESULT): PEG_PARSER_RESULT&lt;br /&gt;
		-- Builds a value attribute&lt;br /&gt;
	local&lt;br /&gt;
		l_list_item: LIST_ITEM&lt;br /&gt;
	do&lt;br /&gt;
		Result := a_result&lt;br /&gt;
		create l_list_item.make&lt;br /&gt;
		if attached {STRING} Result.internal_result.first as l_name then&lt;br /&gt;
			l_list_item.name := l_name&lt;br /&gt;
		end&lt;br /&gt;
		Result.replace_result (l_list_item)&lt;br /&gt;
	end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
build_list (a_result: PEG_PARSER_RESULT): PEG_PARSER_RESULT&lt;br /&gt;
		-- Builds a value attribute&lt;br /&gt;
	do&lt;br /&gt;
		Result := a_result&lt;br /&gt;
		Result.replace_result (Result.internal_result)&lt;br /&gt;
	end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Error Handling ==&lt;br /&gt;
To fix source code we need to output syntax errors detected in the parsing process. After every parsing with the parse_string feature we get a PEG_PARSING_RESULT with all the information we need.&lt;br /&gt;
On the one hand there is the above mentioned internal_result which is a list of domain models (possibly empty). On the other hand the PEG_PARSING_RESULT object tells you if and where an error occurred.&lt;br /&gt;
There are two different cases of a failure: either the parser failed on a character expecting an other one and thus flagging the parsing result as a failure. Or it didn't fail but some of the source code has not been parsed, so only a part of the code is valid.&lt;br /&gt;
In the first case we can find out where the syntax lies by inquiring longest_match_line_row:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
l_result.longest_match_line_row&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
This feature returns the line and row where the parser failed in a &amp;lt;code&amp;gt;TUPLE [line, row: INTEGER]&amp;lt;/code&amp;gt;.&lt;br /&gt;
For the second scenario we have to check if the string left to parse is empty:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
l_result.left_to_parse.is_empty&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
If it is empty everything could be parsed. Otherwise we will find the location where the parsing ended with the same &amp;lt;code&amp;gt;l_result.longest_match_line_row&amp;lt;/code&amp;gt; as before.&lt;br /&gt;
===Advanced error handling===&lt;br /&gt;
Most of the times source code can have semantic errors which can't be detected directly via the syntax. There is the possibility of analyzing the domain model ''after'' it has been generated. With PEGs we can directly interfere with the parsing process and add errors/warnings to the output (&amp;lt;code&amp;gt;PEG_PARSER_RESULT&amp;lt;/code&amp;gt;).&lt;br /&gt;
If we have the building agents defined we can validate them in the same feature. As an example we take the previously defined list grammar and expand it by raising an error and stopping the parsing process, if the name is not in the database (assuming there is a database of names):&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
build_list_item (a_result: PEG_PARSER_RESULT): PEG_PARSER_RESULT&lt;br /&gt;
		-- Builds a value attribute&lt;br /&gt;
	local&lt;br /&gt;
		l_list_item: LIST_ITEM&lt;br /&gt;
	do&lt;br /&gt;
		Result := a_result&lt;br /&gt;
		create l_list_item.make&lt;br /&gt;
		if attached {STRING} Result.internal_result.first as l_name then&lt;br /&gt;
			if database.has (l_name)&lt;br /&gt;
				l_list_item.name := l_name&lt;br /&gt;
			else&lt;br /&gt;
				Result.put_error_message (&amp;quot;Name &amp;quot; + l_name + &amp;quot; is not in database!&amp;quot;) -- Add an error&lt;br /&gt;
				Result.success := False -- Stop the parsing process (of this branch)&lt;br /&gt;
			end&lt;br /&gt;
		else&lt;br /&gt;
			Result.put_error_message (&amp;quot;Name is not valid!&amp;quot;) -- This line should actually never be executed&lt;br /&gt;
		end&lt;br /&gt;
		Result.replace_result (l_list_item)&lt;br /&gt;
	end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Sandrod</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=PEG_Library&amp;diff=13193</id>
		<title>PEG Library</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=PEG_Library&amp;diff=13193"/>
				<updated>2009-08-19T18:53:57Z</updated>
		
		<summary type="html">&lt;p&gt;Sandrod: /* Internal DSL */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page describes the Parsing Expression Library implementation for Eiffel. Information about PEGs can be found here [http://en.wikipedia.org/wiki/Parsing_expression_grammar].&lt;br /&gt;
&lt;br /&gt;
==Basic classes==&lt;br /&gt;
All parsers inherit from PEG_ABSTRACT_PEG which defines the common functionalities. The parsers are the same as in the definition of Wikipedia with additional classes like whitespace support.&lt;br /&gt;
&lt;br /&gt;
The parsers are combined to a object hierarchy which defines the grammar. A string can then be parsed via the feature&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
parser.parse_string (&amp;quot;Some source&amp;quot;)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
on the root object.&lt;br /&gt;
&lt;br /&gt;
==Internal DSL==&lt;br /&gt;
Objects can be combined via features, but the easier way is to use the defined operators. For instance if we want to define the simple grammar&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
'a' 'b' 'c'*&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
we will simply write:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
a + b + (-c)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Where a, b, c are already defined as character parsers parsing the right character (PEG_CHARACTER). The '+' operator concatenates the parsers to a sequence (PEG_SEQUENCE), while the prefix operator '-' wraps c into a one or more parser (PEG_ONE_OR_MORE).&lt;br /&gt;
All the operators are:&lt;br /&gt;
&lt;br /&gt;
* binary '+': Sequence concatenation&lt;br /&gt;
* binary '|': Choice concatenation&lt;br /&gt;
* prefix '+': wraps one or more&lt;br /&gt;
* prefix '-': wraps zero or more&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Additionally there is the operator '|+' which acts like the binary '+' operator. In contrast to it, it inserts a &amp;lt;code&amp;gt;whitespace*&amp;lt;/code&amp;gt; parser between the two operands. As it is often needed it makes sense to define it as an operator.&lt;br /&gt;
&lt;br /&gt;
Be aware of a common mistake in combination with the binary '|'/'+' operators. If for instance you define an identifier as:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
identifier := a_to_z + (- (a_to_z | underscore))&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
If you go on and define two new parsers based on the latter one:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
identifier2 := identifier |+ identifier&lt;br /&gt;
identifier3 := identifier |+ identifier |+ identifier&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
.. then you won't get the expected result. Since the + operator (as well as |+ and |) reuses the Sequence instance, &amp;lt;code&amp;gt;identifier2&amp;lt;/code&amp;gt; uses the sequence of &amp;lt;code&amp;gt;identifier&amp;lt;/code&amp;gt; and adds this very same instance to it. identifier3 will then use that corrupted identifier object which leads to unexpected behaviour while parsing.&lt;br /&gt;
To prevent this problem identifier has to be fixated:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
identifier.fixate&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Building a domain model==&lt;br /&gt;
A domain model can be directly created while parsing most of the times and doesn't have to be derived from the AST. With this implementation it can be achieved by defining builder agents on the various parser fragments.&lt;br /&gt;
To show its workings we will look at an example grammar for a definition of a &amp;quot;list language&amp;quot;:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
'(' identifier (',' identifier)* ')'&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
We assume that identifier is already defined.&lt;br /&gt;
The corresponding parser in the parser syntax would be&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
list := open_parenthesis + identifier + (- (comma + identifier)) + close_parenthesis&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
No we can define a feature on identifier which builds a list item and one on list which creates a list with the items:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
list.set_behaviour (agent build_list)&lt;br /&gt;
identifier.set_behaviour (agent build_list_item)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
The implementation of those are the following:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
build_list_item (a_result: PEG_PARSER_RESULT): PEG_PARSER_RESULT&lt;br /&gt;
		-- Builds a value attribute&lt;br /&gt;
	local&lt;br /&gt;
		l_list_item: LIST_ITEM&lt;br /&gt;
	do&lt;br /&gt;
		Result := a_result&lt;br /&gt;
		create l_list_item.make&lt;br /&gt;
		if attached {STRING} Result.internal_result.first as l_name then&lt;br /&gt;
			l_list_item.name := l_name&lt;br /&gt;
		end&lt;br /&gt;
		Result.replace_result (l_list_item)&lt;br /&gt;
	end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
build_list (a_result: PEG_PARSER_RESULT): PEG_PARSER_RESULT&lt;br /&gt;
		-- Builds a value attribute&lt;br /&gt;
	do&lt;br /&gt;
		Result := a_result&lt;br /&gt;
		Result.replace_result (Result.internal_result)&lt;br /&gt;
	end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Error Handling ==&lt;br /&gt;
To fix source code we need to output syntax errors detected in the parsing process. After every parsing with the parse_string feature we get a PEG_PARSING_RESULT with all the information we need.&lt;br /&gt;
On the one hand there is the above mentioned internal_result which is a list of domain models (possibly empty). On the other hand the PEG_PARSING_RESULT object tells you if and where an error occurred.&lt;br /&gt;
There are two different cases of a failure: either the parser failed on a character expecting an other one and thus flagging the parsing result as a failure. Or it didn't fail but some of the source code has not been parsed, so only a part of the code is valid.&lt;br /&gt;
In the first case we can find out where the syntax lies by inquiring longest_match_line_row:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
l_result.longest_match_line_row&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
This feature returns the line and row where the parser failed in a &amp;lt;code&amp;gt;TUPLE [line, row: INTEGER]&amp;lt;/code&amp;gt;.&lt;br /&gt;
For the second scenario we have to check if the string left to parse is empty:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
l_result.left_to_parse.is_empty&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
If it is empty everything could be parsed. Otherwise we will find the location where the parsing ended with the same &amp;lt;code&amp;gt;l_result.longest_match_line_row&amp;lt;/code&amp;gt; as before.&lt;br /&gt;
===Advanced error handling===&lt;br /&gt;
Most of the times source code can have semantic errors which can't be detected directly via the syntax. There is the possibility of analyzing the domain model ''after'' it has been generated. With PEGs we can directly interfere with the parsing process and add errors/warnings to the output (&amp;lt;code&amp;gt;PEG_PARSER_RESULT&amp;lt;/code&amp;gt;).&lt;br /&gt;
If we have the building agents defined we can validate them in the same feature. As an example we take the previously defined list grammar and expand it by raising an error and stopping the parsing process, if the name is not in the database (assuming there is a database of names):&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
build_list_item (a_result: PEG_PARSER_RESULT): PEG_PARSER_RESULT&lt;br /&gt;
		-- Builds a value attribute&lt;br /&gt;
	local&lt;br /&gt;
		l_list_item: LIST_ITEM&lt;br /&gt;
	do&lt;br /&gt;
		Result := a_result&lt;br /&gt;
		create l_list_item.make&lt;br /&gt;
		if attached {STRING} Result.internal_result.first as l_name then&lt;br /&gt;
			if database.has (l_name)&lt;br /&gt;
				l_list_item.name := l_name&lt;br /&gt;
			else&lt;br /&gt;
				Result.put_error_message (&amp;quot;Name &amp;quot; + l_name + &amp;quot; is not in database!&amp;quot;) -- Add an error&lt;br /&gt;
				Result.success := False -- Stop the parsing process (of this branch)&lt;br /&gt;
			end&lt;br /&gt;
		else&lt;br /&gt;
			Result.put_error_message (&amp;quot;Name is not valid!&amp;quot;) -- This line should actually never be executed&lt;br /&gt;
		end&lt;br /&gt;
		Result.replace_result (l_list_item)&lt;br /&gt;
	end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Sandrod</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=PEG_Library&amp;diff=13192</id>
		<title>PEG Library</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=PEG_Library&amp;diff=13192"/>
				<updated>2009-08-19T18:52:22Z</updated>
		
		<summary type="html">&lt;p&gt;Sandrod: /* Internal DSL */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page describes the Parsing Expression Library implementation for Eiffel. Information about PEGs can be found here [http://en.wikipedia.org/wiki/Parsing_expression_grammar].&lt;br /&gt;
&lt;br /&gt;
==Basic classes==&lt;br /&gt;
All parsers inherit from PEG_ABSTRACT_PEG which defines the common functionalities. The parsers are the same as in the definition of Wikipedia with additional classes like whitespace support.&lt;br /&gt;
&lt;br /&gt;
The parsers are combined to a object hierarchy which defines the grammar. A string can then be parsed via the feature&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
parser.parse_string (&amp;quot;Some source&amp;quot;)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
on the root object.&lt;br /&gt;
&lt;br /&gt;
==Internal DSL==&lt;br /&gt;
Objects can be combined via features, but the easier way is to use the defined operators. For instance if we want to define the simple grammar&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
'a' 'b' 'c'*&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
we will simply write:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
a + b + (-c)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Where a, b, c are already defined as character parsers parsing the right character (PEG_CHARACTER). The '+' operator concatenates the parsers to a sequence (PEG_SEQUENCE), while the prefix operator '-' wraps c into a one or more parser (PEG_ONE_OR_MORE).&lt;br /&gt;
All the operators are:&lt;br /&gt;
&lt;br /&gt;
* binary '+': Sequence concatenation&lt;br /&gt;
* binary '|': Choice concatenation&lt;br /&gt;
* prefix '+': wraps one or more&lt;br /&gt;
* prefix '-': wraps zero or more&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Additionally there is the operator '|+' which acts like the binary '+' operator. In contrast to it, it inserts a &amp;lt;code&amp;gt;whitespace*&amp;lt;/code&amp;gt; parser between the two operands. As it is often needed it makes sense to define it as an operator.&lt;br /&gt;
&lt;br /&gt;
Be aware of a common mistake in combination with the binary '|'/'+' operators. If for instance you define an identifier as:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
identifier := a_to_z + (- (a_to_z + underscore))&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
If you go on and define two new parsers based on the latter one:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
identifier2 := identifier |+ identifier&lt;br /&gt;
identifier3 := identifier |+ identifier |+ identifier&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
.. then you won't get the expected result. Since the + operator (as well as |+ and |) reuses the Sequence instance, &amp;lt;code&amp;gt;identifier2&amp;lt;/code&amp;gt; uses the sequence of &amp;lt;code&amp;gt;identifier&amp;lt;/code&amp;gt; and adds this very same instance to it. identifier3 will then use that corrupted identifier object which leads to unexpected behaviour while parsing.&lt;br /&gt;
To prevent this problem identifier has to be fixated:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
identifier.fixate&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Building a domain model==&lt;br /&gt;
A domain model can be directly created while parsing most of the times and doesn't have to be derived from the AST. With this implementation it can be achieved by defining builder agents on the various parser fragments.&lt;br /&gt;
To show its workings we will look at an example grammar for a definition of a &amp;quot;list language&amp;quot;:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
'(' identifier (',' identifier)* ')'&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
We assume that identifier is already defined.&lt;br /&gt;
The corresponding parser in the parser syntax would be&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
list := open_parenthesis + identifier + (- (comma + identifier)) + close_parenthesis&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
No we can define a feature on identifier which builds a list item and one on list which creates a list with the items:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
list.set_behaviour (agent build_list)&lt;br /&gt;
identifier.set_behaviour (agent build_list_item)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
The implementation of those are the following:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
build_list_item (a_result: PEG_PARSER_RESULT): PEG_PARSER_RESULT&lt;br /&gt;
		-- Builds a value attribute&lt;br /&gt;
	local&lt;br /&gt;
		l_list_item: LIST_ITEM&lt;br /&gt;
	do&lt;br /&gt;
		Result := a_result&lt;br /&gt;
		create l_list_item.make&lt;br /&gt;
		if attached {STRING} Result.internal_result.first as l_name then&lt;br /&gt;
			l_list_item.name := l_name&lt;br /&gt;
		end&lt;br /&gt;
		Result.replace_result (l_list_item)&lt;br /&gt;
	end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
build_list (a_result: PEG_PARSER_RESULT): PEG_PARSER_RESULT&lt;br /&gt;
		-- Builds a value attribute&lt;br /&gt;
	do&lt;br /&gt;
		Result := a_result&lt;br /&gt;
		Result.replace_result (Result.internal_result)&lt;br /&gt;
	end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Error Handling ==&lt;br /&gt;
To fix source code we need to output syntax errors detected in the parsing process. After every parsing with the parse_string feature we get a PEG_PARSING_RESULT with all the information we need.&lt;br /&gt;
On the one hand there is the above mentioned internal_result which is a list of domain models (possibly empty). On the other hand the PEG_PARSING_RESULT object tells you if and where an error occurred.&lt;br /&gt;
There are two different cases of a failure: either the parser failed on a character expecting an other one and thus flagging the parsing result as a failure. Or it didn't fail but some of the source code has not been parsed, so only a part of the code is valid.&lt;br /&gt;
In the first case we can find out where the syntax lies by inquiring longest_match_line_row:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
l_result.longest_match_line_row&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
This feature returns the line and row where the parser failed in a &amp;lt;code&amp;gt;TUPLE [line, row: INTEGER]&amp;lt;/code&amp;gt;.&lt;br /&gt;
For the second scenario we have to check if the string left to parse is empty:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
l_result.left_to_parse.is_empty&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
If it is empty everything could be parsed. Otherwise we will find the location where the parsing ended with the same &amp;lt;code&amp;gt;l_result.longest_match_line_row&amp;lt;/code&amp;gt; as before.&lt;br /&gt;
===Advanced error handling===&lt;br /&gt;
Most of the times source code can have semantic errors which can't be detected directly via the syntax. There is the possibility of analyzing the domain model ''after'' it has been generated. With PEGs we can directly interfere with the parsing process and add errors/warnings to the output (&amp;lt;code&amp;gt;PEG_PARSER_RESULT&amp;lt;/code&amp;gt;).&lt;br /&gt;
If we have the building agents defined we can validate them in the same feature. As an example we take the previously defined list grammar and expand it by raising an error and stopping the parsing process, if the name is not in the database (assuming there is a database of names):&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
build_list_item (a_result: PEG_PARSER_RESULT): PEG_PARSER_RESULT&lt;br /&gt;
		-- Builds a value attribute&lt;br /&gt;
	local&lt;br /&gt;
		l_list_item: LIST_ITEM&lt;br /&gt;
	do&lt;br /&gt;
		Result := a_result&lt;br /&gt;
		create l_list_item.make&lt;br /&gt;
		if attached {STRING} Result.internal_result.first as l_name then&lt;br /&gt;
			if database.has (l_name)&lt;br /&gt;
				l_list_item.name := l_name&lt;br /&gt;
			else&lt;br /&gt;
				Result.put_error_message (&amp;quot;Name &amp;quot; + l_name + &amp;quot; is not in database!&amp;quot;) -- Add an error&lt;br /&gt;
				Result.success := False -- Stop the parsing process (of this branch)&lt;br /&gt;
			end&lt;br /&gt;
		else&lt;br /&gt;
			Result.put_error_message (&amp;quot;Name is not valid!&amp;quot;) -- This line should actually never be executed&lt;br /&gt;
		end&lt;br /&gt;
		Result.replace_result (l_list_item)&lt;br /&gt;
	end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Sandrod</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=PEG_Library&amp;diff=13191</id>
		<title>PEG Library</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=PEG_Library&amp;diff=13191"/>
				<updated>2009-08-19T18:50:34Z</updated>
		
		<summary type="html">&lt;p&gt;Sandrod: /* Basic classes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page describes the Parsing Expression Library implementation for Eiffel. Information about PEGs can be found here [http://en.wikipedia.org/wiki/Parsing_expression_grammar].&lt;br /&gt;
&lt;br /&gt;
==Basic classes==&lt;br /&gt;
All parsers inherit from PEG_ABSTRACT_PEG which defines the common functionalities. The parsers are the same as in the definition of Wikipedia with additional classes like whitespace support.&lt;br /&gt;
&lt;br /&gt;
The parsers are combined to a object hierarchy which defines the grammar. A string can then be parsed via the feature&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
parser.parse_string (&amp;quot;Some source&amp;quot;)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
on the root object.&lt;br /&gt;
&lt;br /&gt;
==Internal DSL==&lt;br /&gt;
Objects can be combined via features, but the easier way is to use the defined operators. For instance if we want to define the simple grammar &amp;lt;code&amp;gt;'a' 'b' 'c'* &amp;lt;/code&amp;gt; we will simply write:&lt;br /&gt;
&amp;lt;code&amp;gt;a + b + (-c)&amp;lt;/code&amp;gt;&lt;br /&gt;
Where a, b, c are already defined as character parsers parsing the right character (PEG_CHARACTER). The '+' operator concatenates the parsers to a sequence (PEG_SEQUENCE), while the prefix operator '-' wraps c into a one or more parser (PEG_ONE_OR_MORE).&lt;br /&gt;
All the operators are:&lt;br /&gt;
&lt;br /&gt;
* binary '+': Sequence concatenation&lt;br /&gt;
* binary '|': Choice concatenation&lt;br /&gt;
* prefix '+': wraps one or more&lt;br /&gt;
* prefix '-': wraps zero or more&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Additionally there is the operator '|+' which acts like the binary '+' operator. In contrast to it, it inserts a &amp;lt;code&amp;gt;whitespace*&amp;lt;/code&amp;gt; parser between the two operands. As it is often needed it makes sense to define it as an operator.&lt;br /&gt;
&lt;br /&gt;
Be aware of a common mistake in combination with the binary '|'/'+' operators. If for instance you define an identifier as:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
identifier := a_to_z + (- (a_to_z + underscore))&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
If you go on and define two new parsers based on the latter one:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
identifier2 := identifier |+ identifier&lt;br /&gt;
identifier3 := identifier |+ identifier |+ identifier&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
.. then you won't get the expected result. Since the + operator (as well as |+ and |) reuses the Sequence instance, &amp;lt;code&amp;gt;identifier2&amp;lt;/code&amp;gt; uses the sequence of &amp;lt;code&amp;gt;identifier&amp;lt;/code&amp;gt; and adds this very same instance to it. identifier3 will then use that corrupted identifier object which leads to unexpected behaviour while parsing.&lt;br /&gt;
To prevent this problem identifier has to be fixated:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
identifier.fixate&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Building a domain model==&lt;br /&gt;
A domain model can be directly created while parsing most of the times and doesn't have to be derived from the AST. With this implementation it can be achieved by defining builder agents on the various parser fragments.&lt;br /&gt;
To show its workings we will look at an example grammar for a definition of a &amp;quot;list language&amp;quot;:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
'(' identifier (',' identifier)* ')'&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
We assume that identifier is already defined.&lt;br /&gt;
The corresponding parser in the parser syntax would be&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
list := open_parenthesis + identifier + (- (comma + identifier)) + close_parenthesis&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
No we can define a feature on identifier which builds a list item and one on list which creates a list with the items:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
list.set_behaviour (agent build_list)&lt;br /&gt;
identifier.set_behaviour (agent build_list_item)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
The implementation of those are the following:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
build_list_item (a_result: PEG_PARSER_RESULT): PEG_PARSER_RESULT&lt;br /&gt;
		-- Builds a value attribute&lt;br /&gt;
	local&lt;br /&gt;
		l_list_item: LIST_ITEM&lt;br /&gt;
	do&lt;br /&gt;
		Result := a_result&lt;br /&gt;
		create l_list_item.make&lt;br /&gt;
		if attached {STRING} Result.internal_result.first as l_name then&lt;br /&gt;
			l_list_item.name := l_name&lt;br /&gt;
		end&lt;br /&gt;
		Result.replace_result (l_list_item)&lt;br /&gt;
	end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
build_list (a_result: PEG_PARSER_RESULT): PEG_PARSER_RESULT&lt;br /&gt;
		-- Builds a value attribute&lt;br /&gt;
	do&lt;br /&gt;
		Result := a_result&lt;br /&gt;
		Result.replace_result (Result.internal_result)&lt;br /&gt;
	end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Error Handling ==&lt;br /&gt;
To fix source code we need to output syntax errors detected in the parsing process. After every parsing with the parse_string feature we get a PEG_PARSING_RESULT with all the information we need.&lt;br /&gt;
On the one hand there is the above mentioned internal_result which is a list of domain models (possibly empty). On the other hand the PEG_PARSING_RESULT object tells you if and where an error occurred.&lt;br /&gt;
There are two different cases of a failure: either the parser failed on a character expecting an other one and thus flagging the parsing result as a failure. Or it didn't fail but some of the source code has not been parsed, so only a part of the code is valid.&lt;br /&gt;
In the first case we can find out where the syntax lies by inquiring longest_match_line_row:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
l_result.longest_match_line_row&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
This feature returns the line and row where the parser failed in a &amp;lt;code&amp;gt;TUPLE [line, row: INTEGER]&amp;lt;/code&amp;gt;.&lt;br /&gt;
For the second scenario we have to check if the string left to parse is empty:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
l_result.left_to_parse.is_empty&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
If it is empty everything could be parsed. Otherwise we will find the location where the parsing ended with the same &amp;lt;code&amp;gt;l_result.longest_match_line_row&amp;lt;/code&amp;gt; as before.&lt;br /&gt;
===Advanced error handling===&lt;br /&gt;
Most of the times source code can have semantic errors which can't be detected directly via the syntax. There is the possibility of analyzing the domain model ''after'' it has been generated. With PEGs we can directly interfere with the parsing process and add errors/warnings to the output (&amp;lt;code&amp;gt;PEG_PARSER_RESULT&amp;lt;/code&amp;gt;).&lt;br /&gt;
If we have the building agents defined we can validate them in the same feature. As an example we take the previously defined list grammar and expand it by raising an error and stopping the parsing process, if the name is not in the database (assuming there is a database of names):&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
build_list_item (a_result: PEG_PARSER_RESULT): PEG_PARSER_RESULT&lt;br /&gt;
		-- Builds a value attribute&lt;br /&gt;
	local&lt;br /&gt;
		l_list_item: LIST_ITEM&lt;br /&gt;
	do&lt;br /&gt;
		Result := a_result&lt;br /&gt;
		create l_list_item.make&lt;br /&gt;
		if attached {STRING} Result.internal_result.first as l_name then&lt;br /&gt;
			if database.has (l_name)&lt;br /&gt;
				l_list_item.name := l_name&lt;br /&gt;
			else&lt;br /&gt;
				Result.put_error_message (&amp;quot;Name &amp;quot; + l_name + &amp;quot; is not in database!&amp;quot;) -- Add an error&lt;br /&gt;
				Result.success := False -- Stop the parsing process (of this branch)&lt;br /&gt;
			end&lt;br /&gt;
		else&lt;br /&gt;
			Result.put_error_message (&amp;quot;Name is not valid!&amp;quot;) -- This line should actually never be executed&lt;br /&gt;
		end&lt;br /&gt;
		Result.replace_result (l_list_item)&lt;br /&gt;
	end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Sandrod</name></author>	</entry>

	</feed>