2011-09-30  Torsten Irländer <torsten.irlaender@intevation.de>
	Create also master_tbl_eval_total_view in export sql (patch from BR)
	
	* formed/export/sql.py (ExportAsSQL)
	add new method to create master_tbl_eval_total_view.
	The master_tbl_eval_total_view only selects columns/elements
	which has the flag evaluate.
	* formed/export/sql.py (EvaluateColumnsCollector)
	New visitor class to collect alle columns/elements/widgets
	from the formed document tree with flag evalute set

2011-09-30  Torsten Irländer <torsten.irlaender@intevation.de>
	Cleanup code (patch from BR)

	* formed/export/sql.py
	Removed obsolete code, remove mode related code
	order import statements as recommend by PEP-8


2011-08-26  Bjoern Ricks  <bjoern.ricks@intevation.de>

	* setup.py: Update version number to 0.5.13

2011-08-03  Bernhard Herzog  <bh@intevation.de>

	Convert newly generated uuids to unicode

	* formed/instance/simplified.py
	(StructureInstanceNode.make_unique): Convert uuids to
	unicode. Otherwise they're instance of the class uuid.UUID which
	can cause problems because other parts of mpuls expect a unicode
	object here.

2011-07-26  Bernhard Herzog  <bh@intevation.de>

	* formed/instance/backends/xmlexport.py (serialize_case): Fix
	doc-string

2011-07-13  Bernhard Herzog  <bh@intevation.de>

	* formed/renderer/html.py (TreeFormData.__init__): Allow a meta
	node to be passed as the initial node on the node stack. In that
	case the corresponding instance node will be put on the stack.
	This is useful in the meta API implementation when rendering
	cases.

2011-07-08  Bernhard Herzog  <bh@intevation.de>

	* formed/instance/tree.py (InstanceTree.dryConvert): Removed. Not
	used anywhere.

2011-07-07  Bernhard Herzog  <bh@intevation.de>

	When validating meta trees, do not complain about none-tags

	* formed/meta/document.py (Document.validate_tags): Do not
	complain about rules with 'none' tags. 'none' indicates that a
	rule should not be tagged and thus it's perfectly OK for multiple
	rules to have this tag attribute value.

2011-07-01  Bernhard Herzog  <bh@intevation.de>

	Fix inner join syntax for nested repeat groups.

	* formed/export/rg_sql.py (RGNode.create_create_delete): Fix the
	syntax of the inner joins for nested repeat groups. The problem
	only occurred for triply and more deeply nested repeat groups (RG
	in RG in RG).

2011-07-01  Bernhard Herzog  <bh@intevation.de>

	Give update triggers for repeat groups more privileges

	* formed/export/rg_sql.py (SQL_TEMPLATE): Use "SECURITY DEFINER"
	for the update trigger function of the repeat group tables because
	it will be executed with the privileges of a normal CM user but
	for nested repeat groups it will need select privileges on parent
	repeat groups which a CM doesn't have.

2011-07-01  Bernhard Herzog  <bh@intevation.de>

	Use correct column for repeat group parent ids in rg_sql.py

	* formed/export/rg_sql.py (RG_MASTER_ID_TMPL)
	(CREATE_DELETE_TMPL): Use new placeholder PARBASE to create the
	name of the column that contains a repeat group's parent id
	instead of assuming it's always 'master_id'
	(RGNode.__init__): In addition to self.name introduce
	self.basename which contains the repeat group name without the
	appended '_tbl'. To be used to create the column name with the
	parent id.
	(RGNode.create_create_delete, RGNode.create_triggers): Pass the
	parent's basename to the various templates so that the column with
	the parent's id is named correctly.

2011-07-01  Bernhard Herzog  <bh@intevation.de>

	Use substitute instead of safe_substitute in rg_sql.py

	* formed/export/rg_sql.py (RGNode.create_create_delete)
	(RGNode.create_triggers, ExportAsRepeatGroupSQLFilter.doExport):
	Use substitute instead of safe_substitute. substitute will give
	errors if placeholders are missing in the dictionary passed to
	substitute so that errors are found earlier.
	(SQL_TEMPLATE): Adapt to use of substitute which requires that all
	dollar-signs are properly escaped if they're not used for
	placeholders.

2011-07-01  Bernhard Herzog  <bh@intevation.de>

	Handle nested repeat groups correctly in compute_case_structure

	* formed/export/rg_sql.py (SQL_TEMPLATE): Use the correct name for
	the column that contains the id of the parent table of a repeat
	group in compute_case_structure. The code used to assume that that
	column was always called 'master_id' when in fact it's name is
	derived from the table name, but that only makes a difference for
	nested repeat groups.

2011-06-29  Bernhard Herzog  <bh@intevation.de>

	Start implementing a test suite for libformed

	* test/filesupport.py, test/runtests.py, test/test_exprtree.py,
	test/test_repeatnode.py, test/test_xmlimport.py: New. The start of
	a test suite for libformed. The tests currently only cover some of
	the changes implemented in recent months.

2011-06-21  Bernhard Herzog  <bh@intevation.de>

	* scripts/convert.py (main): Initialize logging, so that logging
	output from libformed, e.g. from formed tree validation, is
	written to stderr, instead of being suppressed.

2011-06-10  Bernhard Herzog  <bh@intevation.de>

	Only add the fkz column in SQL export if necessary

	* formed/export/sql.py (SchemaCreator.maybe_add_fkz_column): New
	method to add the fkz column only if it's not defined by the meta
	tree.
	(SchemaCreator.createSchema): Call maybe_add_fkz_column to add the
	fkz column instead of adding it unconditionally.

2011-06-08  Bernhard Herzog  <bh@intevation.de>

	* formed/renderer/html.py
	(FormData.get_ordered_repeat_group): Do not convert non-date
	values to unicode for the comparisons when ordering the repeat
	group instances.

2011-06-07  Bernhard Herzog  <bh@intevation.de>

	MEP 9: Apply ordering to inline repeat groups

	* formed/renderer/html.py (HtmlRenderer.render_repeat_list): Use
	get_ordered_repeat_group instead get_repeat_group from the
	FormData instance so that the repeat group instances are sorted.

2011-06-07  Bernhard Herzog  <bh@intevation.de>

	Move RepeatGroupRenderer.get_ordered_repeat_group to FormData

	* formed/renderer/html.py (FormData.get_ordered_repeat_group)
	(RepeatGroupRenderer.get_ordered_repeat_group): Move
	get_ordered_repeat_group from RepeatGroupRenderer to FormData so
	that it can be used in inline repeat groups as well.
	(RepeatGroupRenderer.render): Adapt accordingly.

2011-06-07  Bernhard Herzog  <bh@intevation.de>

	Compare values correctly when sorting repeat groups

	* formed/renderer/html.py
	(RepeatGroupRenderer.get_ordered_repeat_group): Sort values
	correctly. The old code converted all values to unicode, which led
	to ints being sorted incorrectly. The only reason this was done,
	was that date objects cannot be compared to None without
	exceptions being raised, and the unicode conversion solved
	that. Unfortunately it also means that numbers were sorted
	incorrectly. Actually, most python objects can be compared
	directly without conversions. The only type that has to be treated
	specially are dates. Dates Are now sorted by their gregorian
	ordinal. None is translated to -1 so it will be considered less
	than any date object, just like Python considers None to be less
	than any number or string.

2011-06-07  Bernhard Herzog  <bh@intevation.de>

	* formed/renderer/html.py (RepeatGroupRenderer.get_digest_spec):
	Removed. It's not used anymore.

2011-06-07  Bernhard Herzog  <bh@intevation.de>

	Final part of MEP 10: Order by multiple fields in RG digests

	* formed/renderer/html.py
	(RepeatGroupRenderer.get_ordered_repeat_group): Get the ordering
	specification from the repeat group's meta node with its
	getOrderBy method and implement support for multiple fields and
	per-field ordering directions.
	(RepeatGroupRenderer.render): Adapt to changes in
	get_ordered_repeat_group

2011-06-07  Bernhard Herzog  <bh@intevation.de>

	Second part of MEP 10: validate contents of orderby attribute

	* formed/meta/document.py
	(Document.validate_repeat_group_digests): Extend validation of the
	orderby attribute to support multiple fields and warn when repeat
	elements that have multiple fields in the orderby attribute also
	have a reverse attribute.

2011-06-07  Bernhard Herzog  <bh@intevation.de>

	First part of MEP 10: extended syntax of orderby attribute

	* formed/meta/data.py (RepeatNode.getOrderBy): Parse orderby
	attribute according to the syntax specified in MEP 10.

2011-06-07  Bernhard Herzog  <bh@intevation.de>

	Extract repeat group sorting into separate method

	* formed/renderer/html.py (RepeatGroupRenderer.render)
	(RepeatGroupRenderer.get_ordered_repeat_group): Extract sorting of
	the repeat group instances into the new method
	get_ordered_repeat_group.

2011-06-07  Bernhard Herzog  <bh@intevation.de>

	Remove support for digest parameter of RepeatGroupRenderer

	* formed/renderer/html.py (RepeatGroupRenderer.__init__): Do not
	use the digests parameter anymore. The constructor still accepts
	it for compatibility purposes because there's still code that
	passes it, but no mpuls application actually uses it anymore.
	(RepeatGroupRenderer): Update doc-string.
	(RepeatGroupRenderer.get_digest_spec): Adapt to removal of the
	explicit digest specification passed to the constructor.

2011-06-06  Bernhard Herzog  <bh@intevation.de>

	Implement MEP 11: No tags for rules with tag="none"

	* formed/export/rules.py (generate_tagging): Do not generate tags
	for rules with tag="none". Now we can have error rules that do not
	result in tags if they are violated.

2011-06-06  Bernhard Herzog  <bh@intevation.de>

	First part of MEP 11: Stricter interpretation of tags.

	* formed/export/rules.py (generate_tagging): Make the
	interpretation of the raw tag value stricter. The value must
	either be empty or an int. Raise ValueError for other
	values. Omitted tag attributes are equivalent to empty ones.

2011-05-27  Bernhard Herzog  <bh@intevation.de>

	* scripts/evalexpr.py: New. Script for interactive tests of the
	expression engine.

2011-05-26  Bernhard Herzog  <bh@intevation.de>

	* formed/meta/io/document.py (_toXML): Write an empty info
	element, i.e. <info ... /> as opposed to <info ...></info>, if the
	info leaf doesn't have any children. This improves backwards
	compatibility: info leaves without children (but a
	value-attribute) is still the standard situation in all
	applications and by writing them in the same way as before the
	MEP-6 merge, using convert.py with current libformed will not
	introduce gratuitous cosmetic changes in the formedtree.xml files.
	Fixes a minor problem mentioned in mpuls/issue1971

2011-05-26  Bernhard Herzog  <bh@intevation.de>

	Merge implementation of MEP 6: info-elements with dynamic content

	2011-05-26  Björn Ricks <bjoern.ricks@intevation.de>

	* formed/renderer/html.py (HtmlRenderer.render_info):
	Use new get_content method of InfoLeaf to not have to decide
	which "mode" must be rendered. Now the same code path can be used
	for both cases (value attribute or child elements)

	2011-05-26  Björn Ricks <bjoern.ricks@intevation.de>

	* formed/meta/data.py (InfoLeaf): Add method get_content to
	receive either the list of children or if not present the value
	as list. Other classes don't have to know how to handle the two
	different "modes" of InfoLeaf and can act directly on a list of
	content

	2011-05-26  Björn Ricks <bjoern.ricks@intevation.de>

	Remove InfoLeaf walk and visit methods and validate InfoLeafs
	after loading from a formedtree xml document

	* formed/meta/data.py (InfoLeaf): InfoLeaf is not a Node
	and the current implementations of walk and visit don't return
	all child elements. Also both methods are only used to collect
	the ExprLeafs for validation.
	* formed/meta/document.py (Document): Add new method to validate
	alls InfoLeafs. The new method checks if a InfoLeaf has an attribute
	value and also child elements. In that case it logs an error.
	Furthermore all ExprLeaf child elements are validated.

	2011-05-26  Björn Ricks <bjoern.ricks@intevation.de>

	* formed/meta/io/document.py (_toXML): Escape xml entities
	'&', '<', and '>' from a content of an InfoLeaf

	2011-05-09  Björn Ricks <bjoern.ricks@intevation.de>

	Add and use new evaluate_expression method

	* formed/renderer/html.py (FormData):
	Add new evaluate_expression method which works like
	evaluate_condition but instead of returning False if no
	expression was found it raises a ValueError.
	* (HtmlRenderer.render_info):
	Use new evaluate_expression instead of evaluate_condition

	2011-05-09  Björn Ricks <bjoern.ricks@intevation.de>

	Save InfoLeafs correctly while exporting to xml

	* formed/meta/io/document.py (_toXML):
	Handle InfoLeaf differently then Leaf to be able to save also
	its child nodes. Therefore it's also necessary to check if a
	node is a basestring to be able to save content strings.

	2011-05-06  Björn Ricks <bjoern.ricks@intevation.de>

	Change rendering of InfoLeaf for MEP-6 "Display Field"

	* formed/meta/data.py (HtmlRenderer.render_info):
	InfoLeaf is rendered as before if a value is set. Therefore
	rendering of InfoLeafs is backward compatible. If no value
	attribute is present steps through it's children and evaluates
	possible ExprLeaf child nodes. Now it's possible to render
	calculated strings accordingly to MEP-6.

	2011-05-06  Björn Ricks <bjoern.ricks@intevation.de>

	* formed/meta/data.py (WidgetCollector.visitor):
	Ignore ExprLeafs in WidgetCollector. WidgetCollector is used
	in io module to identify the necessary rows of a db query.
	Therefore ExprLeaf must be ignored.

	2011-05-06  Björn Ricks <bjoern.ricks@intevation.de>

	* formed/meta/data.py (InfoLeaf): Override walk and visit
	methods to visit also child elements which are NodeComponents.
	Other children like strings from xml text content are ignored.
	NodeComponent children must be visited to be able to validate them

	2011-05-06  Björn Ricks <bjoern.ricks@intevation.de>

	* formed/meta/document.py (validate_tree,
	validate_expr_dependencies): Consider also new ExprLeafs
	during validation. Now ExprLeaf expression dependencies are
	checked and evaluated

	2011-05-06  Björn Ricks <bjoern.ricks@intevation.de>

	* formed/meta/io/document.py: Add parsing and creation of
	new ExprLeaf

	2011-05-06  Björn Ricks <bjoern.ricks@intevation.de>

	* formed/meta/data.py (ExprLeaf): Add new class
	ExprLeaf to handle expessions within InfoLeafs.
	ExprLeafs are intented to calculate dynamically generated
	text content in InfoLeafs like maximim of two dates.

	2011-05-06  Björn Ricks <bjoern.ricks@intevation.de>

	* formed/meta/io/parser.py (SAXBuilder):
	override characters method of sax ContentHandler class
	to handle xml text content. Pass the xml content to the
	eat method of the Node Factory from the stack. Necessary
	to implement MEP 6.

	2011-05-06  Björn Ricks <bjoern.ricks@intevation.de>

	* formed/meta/io/document.py: Use new ContentNodeFactory do build
	InfoLeafs. For MEP 6 it's necessary that InfoLeafs are able to
	handle xml text content which should be passed to InfoLeaf during
	xml parsing via a ContentNodeFactory.

	2011-05-06  Björn Ricks <bjoern.ricks@intevation.de>

	Extend and create factory to handle xml text content
	for implementation of MEP 6 Display Node. MEP 6 advises
	to use content and xml child nodes in a InfoLeaf to generate
	calculated content. Therefore it's necessary to pass xml text 
	content to Node Factories.

	* formed/meta/io/factories.py (NodeFactory.eat):
	Only add childs if they are derived from NodeComponent
	* formed/meta/io/factories.py (ContentNodeFactory):
	Add new ContentNodeFactory that passes all kind of elements
	including xml text content to a NodeComponent in it's eat
	method.

	2011-05-06  Björn Ricks <bjoern.ricks@intevation.de>

	Extend InfoLeaf to handle child nodes. For implementation of
	MEP 6 it's necessary to add text content and new expression
	nodes. A InfoLeaf should be able to display variable and
	generated content.

	* formed/meta/data.py (LeafNode):
	Add addChild and getChildren methods to handle children.
	addChild differentiates between NodeComponents and other
	elements in this case unicode strings.

2011-05-20  Bernhard Herzog  <bh@intevation.de>

	* scripts/convert.py: Add the dot-file exporter.

2011-05-20  Bernhard Herzog  <bh@intevation.de>

	* formed/export/dot.py: New. Export the graph of date field order
	as a dot file for easy visualization.

2011-05-17  Bernhard Herzog  <bh@intevation.de>

	Fix XML import of numeric values (mpuls/issue2126)

	* formed/instance/backends/xmlimport.py (decode_numeric): New
	function to decode numeric values.
	(DECODERS): Use decode_numeric for data.NumericLeaf

2011-05-17  Bernhard Herzog  <bh@intevation.de>

	* formed/export/required_rules.py (remove_common_head):
	Removed. It's no longer used anywhere.

2011-05-02  Björn Ricks <bjoern.ricks@intevation.de>

	* formed/export/required_rules.py
	(GenerateRequiredRules.generateDateSequenceRules): Use directly 
	the date field descriptions instead of using the descriptions and
	remove_common_head functions which were initially designed to display a
	tree path to the other date field for the rule description generation.
	The original implementation caused empty strings for the date field
	descriptions if both descriptions were equal.
	This problem was found in issue2092.

2011-05-12  Torsten Irländer <torsten.irlaender@intevation.de>

	* formed/export/rules.py: Handle List-operator

2011-05-11  Bernhard Herzog  <bh@intevation.de>

	* formed/meta/document.py: Remove unused imports.

2011-05-11  Bernhard Herzog  <bh@intevation.de>

	* formed/meta/document.py
	(Document.validate_conditional_dependencies): Removed. It turns
	out that the cases it checks (conditionals referring to fields
	contained in conditionals) actually do occur in real applications,
	specifically WASKA and WASKO, and they rely on the way this
	happens to be implemented now. So there's no point in warning
	about it.
	(Document.validate_tree): Adapt to removal of
	validate_conditional_dependencies

2011-05-10  Bernhard Herzog  <bh@intevation.de>

	* formed/export/sql.py (RelationAnonymizer.__init__)
	(ExportAsSQL._writeAnonymizationView): Remove support for the
	obsolete anonymization function suppress_value2. It was identical
	to suppress_value and was only still used in WASKA. WASKA has been
	updated to use suppress_value instead of suppress_value2 now, so
	there's no need anymore to keep supporting suppress_value2.

2011-05-09  Bernhard Herzog  <bh@intevation.de>

	* formed/meta/document.py (Document): Add doc-string. In
	particular, document the mappings name2nc, name2page, name2rules,
	name2markingrules and name2conditionals

2011-05-09  Bernhard Herzog  <bh@intevation.de>

	In rg_sql export, create triggers that call set_lastaccess_time
	Fixes main part of mpuls/issue1922

	* formed/export/rg_sql.py (TRIGGER_TMPL): Extend the insert and
	delete trigger functions to also call set_lastaccess_time. Add an
	update trigger that calls set_lastaccess_time.
	(RG_MASTER_ID_TMPL): New. Template for an SQL expression that
	determines the master id for a given repeat group instance
	(SUBSELECT_TMPL): Removed. No longer used.
	(RGNode.create_triggers): Use RG_MASTER_ID_TMPL instead of
	SUBSELECT_TMPL because TRIGGER_TMPL now uses a different way to
	use the master id.

2011-05-02  Björn Ricks <bjoern.ricks@intevation.de>

	* formed/renderer/html.py (HtmlRenderer.render_repeat_list):
	Render empty control button field also if showcontrol has a non
	set "add instance" bit and read_only is set. Fixes rendering
	issue for inline Repeat Groups.

2011-05-02  Björn Ricks <bjoern.ricks@intevation.de>

	* formed/renderer/html.py (RepeatGroupRenderer.render):
	Evaluate showcontrols expression also for digest RepeatGroups.
	If readonly is not set show add instance button if first bit
	is set and delete instance button if second bit is set. Part
	of MEP-13.

2011-05-02  Björn Ricks <bjoern.ricks@intevation.de>

	* formed/renderer/html.py (HtmlRenderer.render_repeat_list):
	Evaluate showcontrols expression for inline RepeatGroups.
	Afterwards show delete instance button if second bit is set
	and show add instance button if first bit is set to implement
	MEP-13.

2011-05-02  Björn Ricks <bjoern.ricks@intevation.de>

	* formed/meta/data.py (RepeatNode):
	Add new attribute showcontrols that contains an expression
	to evaluate if control should be shown in a gui. Necessary
	to implement MEP-13

2011-05-02  Björn Ricks <bjoern.ricks@intevation.de>

	* formed/renderer/html.py (render_reference):
	Raise a ValueError if reference can't be resolved
	or ref attribute isn't set.

2011-05-02  Björn Ricks <bjoern.ricks@intevation.de>

	* formed/meta/data.py (ReferenceNode):
	Add __repr__ method to get improved output in log and
	error messages.

2011-05-02  Björn Ricks <bjoern.ricks@intevation.de>

	Remove unnecessary validation checks for ReferenceNodes

	* formed/meta/document.py (validate_references):
	Remove obsolte checks for referenced GroupNodes:
	- check if referenced group is child of a choice or radio
	Radio and ChoiceNode children aren't in name2nc therefore
	this check is always needless
	- check if referenced group contains a page
	This check is implicit contained in "check if referenced element
	is child of a PageNode". If a group contains a page it's clearly
	not a child of a page.

2011-05-02  Björn Ricks <bjoern.ricks@intevation.de>

	* formed/meta/io/document.py (_toXML):
	fixed typo (ReferenceNode)

2011-04-29  Björn Ricks <bjoern.ricks@intevation.de>

	* formed/meta/io/document.py (_toXML):
	Handle ReferenceNode like Leaf while creating xml

2011-04-29  Björn Ricks <bjoern.ricks@intevation.de>

	Implement checks for references (details in MEP 7)

	* formed/meta/document.py (validate_tree,
	validate_references): During loading the meta tree
	ReferenceNodes are checked for validity. Currently only
	bad cases are checked therefore after creating a new
	element the checks may have to be updated.

2011-04-29  Björn Ricks <bjoern.ricks@intevation.de>

	Implement Reference element according to MEP 7.
	Currently overwriting the description is omitted and
	may be implemented in future.

	* formed/meta/data.py: Implement class ReferenceNode which
	is derived from NodeComponent and represents the reference
	element.
	* formed/meta/io/document.py: Add SimpleCreator for reference
	element to parse it from an formedtree.xml file.
	* formed/instance/backends/postgres.py (buildChildren):
	Ignore ReferenceNodes while loading data from postges database.
	* formed/renderer/html.py (render_nc, render_reference): Add
	rendering of ReferenceNodes. render_reference loads the
	referenced element and recalls render_nc with the loaded
	element. If the referenced element can't be loaded an empty
	text is rendered.

2011-04-20  Roland Geider <roland.geider@intevation.de>
	* formed/instance/backends/common.py: Fix problem with exception that
	  occurs  when there are uncommited fields

2011-04-20  Roland Geider <roland.geider@intevation.de>
	* formed/instance/backends/common.py: issue1537: apply patch so the
	  sum rules in JMD finish in a reasonable time

2011-04-08  Bernhard Herzog  <bh@intevation.de>

	* formed/i18n/de/LC_MESSAGES/libformed.po: Fix translation of
	"unknown". A development/debugging version was checked in
	accidentally.
	Fixes mpuls/issue2008

2011-04-07  Bernhard Herzog  <bh@intevation.de>

	Remove the mode feature from sql.py

	* formed/export/sql.py (SchemaCreator.__init__): Remove the mode
	and allModes parameters and the instance variables mode, allModes
	and modesStack.
	(SchemaCreator.modeCheck): Removed. No longer used.
	(SchemaCreator.createSchema): Remove usage of the modesStack
	instance variable.
	(SchemaCreator._createRecursive, SchemaCreator._createDate)
	(SchemaCreator._createBool, SchemaCreator._createText)
	(SchemaCreator._createTextArea, SchemaCreator._createInteger)
	(SchemaCreator._createNumeric, SchemaCreator._createChoice)
	(SchemaCreator._createRadioGroup)
	(SchemaCreator._createRepeatNode, SchemaCreator._createChild):
	Removed the modeCheck decorator.
	(ExportAsSQL.printRepeats): Remove the mode and allModes
	parameters.
	(ExportAsSQL.doExport): Do not pass the mode and allModes
	parameters to SchemaCreator and printRepeats

2011-04-07  Bernhard Herzog  <bh@intevation.de>

	* formed/export/sql.py: Remove commented-out code.

2011-04-07  Bernhard Herzog  <bh@intevation.de>

	* formed/export/sql.py: Remove unused imports.

2011-04-07  Bernhard Herzog  <bh@intevation.de>

	* formed/export/sql.py: Reorder imports according to mpuls
	conventions

2011-04-07  Bernhard Herzog  <bh@intevation.de>

	Some more formatting fixes in sql.py

	* formed/export/sql.py (ExportAsSQL.printRepeats): Fix formatting
	of the list assigned to linear. Call list instead of using a list
	comprehension is more direct and reduces indentation so that the
	entire statement fits into 80 columns when spread over three
	lines. This is made easier by passing the two classes whose
	instances are searched as a tuple to isinstance.

2011-04-07  Bernhard Herzog  <bh@intevation.de>

	* formed/export/sql.py: Format code according to mpuls
	conventions.

2011-04-07  Bernhard Herzog  <bh@intevation.de>

	Call correct method for NumericLeaf instances in sql.py.

	* formed/export/sql.py (SchemaCreator._createChild): Call the
	correct method for NumericLeaf instances. The method had been
	renamed from _createFloat to _createNumeric when the code was
	ported from FormEd to libformed, but the one place where it's
	called hadn't been changed accordingly.

2011-04-07  Bernhard Herzog  <bh@intevation.de>

	* formed/export/rg_sql.py (ExportAsRepeatGroupSQLFilter.doExport):
	Simplify the try/finally logic that closes the output file.

2011-04-07  Bernhard Herzog  <bh@intevation.de>

	Simplify handling of minimal number of RG instances in rg_sql

	* formed/export/rg_sql.py (RGCreator._createRepeatNode): Simplify
	handling of the minimal number of instances of the repeat
	group. In libformed, the RepeatNode.getMin method always returns
	an int, so there's no need to convert its return value to int
	anymore.

2011-04-07  Bernhard Herzog  <bh@intevation.de>

	* formed/export/rg_sql.py: Format code according to mpuls
	conventions.

2011-04-07  Bernhard Herzog  <bh@intevation.de>

	* formed/export/xsd.py: Reorder imports according to mpuls
	conventions

2011-04-07  Bernhard Herzog  <bh@intevation.de>

	* formed/export/xsd.py: Format code according to mpuls
	conventions.

2011-04-06  Bernhard Herzog  <bh@intevation.de>

	* formed/export/xls.py: Remove commented-out code.

2011-04-06  Bernhard Herzog  <bh@intevation.de>

	* formed/export/xls.py (XLS_HEADER, XLS_FOOTER): Removed. They're
	not used anywhere.

2011-04-06  Bernhard Herzog  <bh@intevation.de>

	* formed/export/xls.py: Remove unused imports.

2011-04-06  Bernhard Herzog  <bh@intevation.de>

	* formed/export/xls.py: Reorder imports according to mpuls
	conventions

2011-04-06  Bernhard Herzog  <bh@intevation.de>

	* formed/export/xls.py: Format code according to mpuls
	conventions.

2011-04-06  Bernhard Herzog  <bh@intevation.de>

	* formed/export/required_rules.py (VariableType.__init__): Remove
	the modes feature.

2011-04-06  Bernhard Herzog  <bh@intevation.de>

	* formed/export/required_rules.py: Adapt code formatting to mpuls
	conventions.

2011-04-06  Bernhard Herzog  <bh@intevation.de>

	* formed/export/required_rules.py: Remove unused imports.

2011-04-06  Bernhard Herzog  <bh@intevation.de>

	* formed/export/required_rules.py: Reorder imports.

2011-04-01  Bernhard Herzog  <bh@intevation.de>

	* formed/export/xls.py (SchemaCreator._createChoice): Port FormEd
	revision 444: Generate correct XLS if there are conditionals in
	Choices

2011-04-01  Bernhard Herzog  <bh@intevation.de>

	* formed/export/xsd.py (SchemaCreator._createChoice): Port FormEd
	revision 443: Generate correct XSD if there are conditionals in
	Choices.

	The XSD in this case is the schema for exported instance
	trees. The other part of revision 443 is not relevant for
	libformed because it disables FormEds internal web-server which
	libformed doesn't even have.

2011-04-01  Bernhard Herzog  <bh@intevation.de>

	* formed/export/xsd.py: Port FormEd revision 442: Updated XSD for
	formed meta trees.

2011-04-01  Bernhard Herzog  <bh@intevation.de>

	* formed/export/xsd.py (XSD_HEADER): Port FormEd revision 440:
	Added support for 'float' element.
	This change affects the schema for the formed meta tree.

2011-03-16  Bernhard Herzog  <bh@intevation.de>

	Check that rule tags are unique when loading a meta tree

	* formed/meta/document.py (Document.validate_tags): New. Check
	that the tags defined for the rules are unique.
	(Document.validate_tree): Call validate_tags

2011-03-16  Roland Geider  <roland.geider@intevation.de>

	* formed/renderer/html.py: issue1831: add an empty "value" to the
	  repeat group buttons so the browser doesn't show a "send data" text
	  overlayed over the button

2011-03-11  Bernhard Herzog  <bh@intevation.de>

	Remove superflous logging config from formed/export/__init__.py

	* formed/export/__init__.py: Remove all contents. There's no need
	to perform logging configuration here as well. That's already been
	taken care off in formed/__init__.py.

2011-03-11  Bernhard Herzog  <bh@intevation.de>

	Merge second part of port of the formed export scripts:

	2011-03-01  Björn Ricks  <bjoern.ricks@intevation.de>

		New "clean" exporter which reads the a formed xml filei and
		creates a formed document tree

		* scripts/convert.py
		add new clean exportet
		* formed/export/clean.py
		this exportet is intended to get a unified formatting of
		formedtree.xml files. It's possible to change a formedtree
		xml file manually without careing about sorting of attributes,
		etc. and afterwards run this converter to get a common
		formatting

	2011-02-25  Björn Ricks      <bjoern.ricks@intevation.de>

		Moved required rules generation from FormEd to libformed

		* formed/export/required_rules.py
		(WidgetCollectorWithRepeatGroups)
		Add a new WidgetCollector to collect also Leafs inside
		RepeatGroups
		* formed/export/required_rules.py (GenerateRequiredRules)
		Rename filterDocument to doExport and also save document tree
		as xml file.
		Adapt to libformed changes and dropped mode handling

	2011-02-25  Björn Ricks      <bjoern.ricks@intevation.de>

		Improve readability of generated formed tree xml output
		which is now the same as in Formed

		* formed/meta/io/document.py (_attributesToXML, _toXML)
		Every Element is in a new line now. Add ident for child
		elements. Sort element attributes by name

	2011-02-25  Björn Ricks      <bjoern.ricks@intevation.de>

		Add new methods for meta tree data classes

		* formed/meta/data.py (DateLeaf)
		Add order attribute and getOrder method. They are
		needed to generate required rules
		* formed/meta/data.py (RuleLeaf)
		add setExpr method to be able to create new RuleLeafs
		in required rules generator

	2011-02-24  Björn Ricks      <bjoern.ricks@intevation.de>

		Add description for all export classes

		* formed/export/rg_sql.py
		* formed/export/rules.py
		* formed/export/sql.py
		* formed/export/xls.py
		* formed/export/xsd.py
		add a static getDescription method to get info
		about the export class
		* scripts/convert.py
		add new -l/--list-formats option to print all
		formats and their description
		add short option -f for --format

2011-03-11  Bernhard Herzog  <bh@intevation.de>

	Merge first part of port of the formed export scripts:

	2011-02-23  Björn Ricks  <bjoern.ricks@intevation.de>

		Move XSL export from FormEd to libformed

		* formed/export/xsd.py
		add modified ExportKeyValueTableAsXLS class from FormEd
		to libformed. Removed all GUI and mode related code.
		Added special handling of RepeatNodes.
		* scripts/convert.py
		add new format for ExportKeyValueTableAsXLS

	2011-02-23  Björn Ricks  <bjoern.ricks@intevation.de>

		Move XML Schema export from FormEd to libformed

		* formed/export/xsd.py
		add modified ExportAsXMLSchema and ExportAsXMLSchemaExport
		classes from FormEd to libformed. Removed all mode related
		code and dropped the gui parts. Added handling of
		RepeatNode because in FormEd it was a subclass of
		GroupNode.
		* scripts/convert.py
		add new formats for ExportAsXMLSchema and
		ExportAsXMLSchemaExport

	2011-02-23  Björn Ricks  <bjoern.ricks@intevation.de>

		Move tagging export from FormEd to libformed

		* formed/export/rules.py
		add modified ExportRulesForTagging and ExportRulesAsSH
		classes from FormedEd to libformed. Removed all mode
		related code and dropped the gui
		* scripts/convert.py
		add new formats for ExportRulesForTagging and
		ExportRulesAsSH

	2011-02-23  Björn Ricks  <bjoern.ricks@intevation.de>

		Add new tag attribute for RuleLeaf

		* formed/meta/data.py (RuleLeaf)
		add new tag attribute and setAttribute method for
		RuleLeaf for convert to tagging exporters

	2011-02-23  Björn Ricks  <bjoern.ricks@intevation.de>

		Add export converter for RepeatGroup SQL statements

		* formed/export/rg_sql.py
		Copied from FormEd and adjusted to libformed changes.
		Removed mode usage and created a constructor for
		ExportAsRepeatGroupSQLFilter that takes a Document
		as parameter
		* scripts/convert.py
		dropped input and output parameters and used arguments
		1 and 2 for passing in and out file.
		added a parameter type to choose the converter type

	2011-02-22  Björn Ricks  <bjoern.ricks@intevation.de>

		Add script for conversion between formedtree and other
		formats like sql

		* scripts/convert.py
		Implement a script that uses ExportAsSQL class to
		convert a formedtree.xml file to sql to create a
		databse schema

	2011-02-22  Björn Ricks  <bjoern.ricks@intevation.de>

		Move sql converter from FormEd GUI into libformed

		* formed/export
		add modified sql.py file from FormEd. Removed gui
		related code and adjusted FloatLeaf usage to new
		name NumericLeaf

2011-02-22  Björn Ricks  <bjoern.ricks@intevation.de>

		Implement getFunction method for NodeComponents

		* formed/meta/nodecomponents.py (NodeComponents)
		Implement getFunction method for converter to sql

2011-03-10  Bernhard Herzog  <bh@intevation.de>

	Rename BUILDLIST to pop_to_mark

	* formed/meta/exprtree.py (BUILDLIST, pop_to_mark): Rename
	BUILDLIST to pop_to_mark. The new name makes it a bit more generic
	and describes the purpose a bit better and the upper-case names
	are usually used for the functions that implement operators and
	not for helper functions like pop_to_mark.

2011-03-10  Bernhard Herzog  <bh@intevation.de>

	simplify BUILDLIST and make it raise ValueError if MARK not found

	* formed/meta/exprtree.py (BUILDLIST): Make the implementation
	more straightforward and raise an ValueError if there's no MARK on
	the stack instead of silently putting the entire stack into the
	list.

2011-03-10  Bernhard Herzog  <bh@intevation.de>

	Use a specific object for the list mark on the stack

	* formed/meta/exprtree.py (Mark, MARK): Remove the class Mark and
	introduce the object instance MARK to be used instead. This makes
	the check for the mark a little easier (is MARK instead of
	isinstance(..., Mark) and is more like it's done in
	e.g. postscript.
	(BUILDLIST): Adapt to Mark/MARK changes

2011-03-10  Bernhard Herzog  <bh@intevation.de>

	* formed/meta/exprtree.py (MARK): Removed. It's not used anywhere.

2011-03-10  Bernhard Herzog  <bh@intevation.de>

	Remove special case for the '[' token

	* formed/meta/exprtree.py (Expr.compile): Remove special case for
	the '[' token. It's handled by the NODE_FACTORIES dictionary now.
	(NODE_FACTORIES): Add the '[' token.

2011-03-10  Bernhard Herzog  <bh@intevation.de>

	The List node is not a unary operator.

	* formed/meta/exprtree.py (ListNode, List): List isn't a unary
	operator. In fact, it's rather an n-ary operator. So do not derive
	from Unary. Also rename ListNode to List as it is more similar to
	the other node classes.

2011-03-10  Bernhard Herzog  <bh@intevation.de>

	Fix list evaluation so that lists may contain variable references

	* formed/meta/exprtree.py (ListNode.eval, CONTAINS): Like the
	other functions implementing binary operators, CONTAINS should
	work on the results of evaluations and not evaluate expressions
	itself. Also, the context which is required for variable
	references is only available in the ListNode's eval method, not in
	CONTAINS. So, evaluate the list members in ListNode where the
	context object is available and not in CONTAINS. Now lists may
	contain variable references.

2011-03-01  Bernhard Herzog  <bh@intevation.de>

	Disable rendering of conditional description again temporarily

	* formed/renderer/html.py (HtmlRenderer.do_render_conditional):
	Disable rendering of the conditional description. For now it's
	better not to render it until the applications have been updated
	to provide user friendly descriptions. See issue1859.

2011-02-25  Bernhard Herzog  <bh@intevation.de>

	* scripts/checkoldfeatures.py: New script to check for old and
	obsolete features used in an formedtree XML file.

2011-02-24  Bernhard Herzog  <bh@intevation.de>

	Always format values according to german conventions

	* formed/renderer/html.py (LocaleAwareFormatter, GermanFormatter):
	Turn LocaleAwareFormatter into GermanFormatter, i.e. rename it and
	always format values according to the german conventions instead
	of relying on the locale. This is done for two purposes: the
	previous code didn't work on windows which doesn't have
	nl_langinfo and making the formatting locale dependent, even
	though the parsing of the same strings in formed.meta.semantic is
	locale independent isn't sensible either. The windows suport is
	necessary for the mpuls offline client which has to work on
	windows.

2011-02-23  Bernhard Herzog  <bh@intevation.de>

	Merge from Björn Ricks: Remove unneeded evaluate_conditional methods

	* formed/renderer/html.py (StructureFormData.evaluate_conditional)
	(TreeFormData.evaluate_conditional): Removed. They were identical
	to the base-class method.

2011-02-23  Bernhard Herzog  <bh@intevation.de>

	Split the conditional description rendering from the conditional logic

	* formed/renderer/html.py (HtmlRenderer.render_conditional_description)
	(HtmlRenderer.do_render_conditional): Move the actual rendering of
	the conditional description to the new method
	render_conditional_description to that do_render_conditional is
	kept limited to actual conditional logic without any actual HTML
	rendering.

2011-02-23  Bernhard Herzog  <bh@intevation.de>

	Fix condition for rendering the description of a conditional

	* formed/renderer/html.py (HtmlRenderer.do_render_conditional):
	Fix the logic that decides when the description is shown: whether
	the description should be rendered depends on the availability of
	the description and on the evaluation of the conditional's
	expression, but not on the read-only flag of the renderer. If
	e.g. the renderer is in read-only mode before the conditional is
	rendered the contents of the conditional will always be rendered
	read-only, but the description should not be shown if the
	conditional evaluates to true.

2011-02-23  Bernhard Herzog  <bh@intevation.de>

	Merge rendering of conditional description from Björn Ricks

	* formed/renderer/html.py (HtmlRenderer.do_render_conditional):
	Render description if the conditional's expression evaluates to
	False.

2011-02-23  Bernhard Herzog  <bh@intevation.de>

	Validate repeat group digest specifications

	* formed/meta/document.py (containing_repeat_group): New. Helper
	function to find the repeat group a node component is contained
	in.
	(Document.validate_repeat_group_digests)
	(Document.validate_digest_field): New methods to validate repeat
	group digest specifications.
	(Document.validate_tree): Call validate_repeat_group_digests

2011-02-22  Bernhard Herzog  <bh@intevation.de>

	Use the repeat group digest specs from the meta tree when rendering

	* formed/renderer/html.py (RepeatGroupRenderer.get_digest_spec):
	New method to determine the digest specification for a repeat
	group.
	(RepeatGroupRenderer.render): Call get_digest_spec to determine
	the digest specification instead of taking it directly from the
	specifications passed to the constructor.

2011-02-22  Bernhard Herzog  <bh@intevation.de>

	Extend the meta tree to allow repeat group digest specifications

	* formed/meta/data.py (RepeatNode.__init__): Add attributes
	"orderby" and "reverse"
	(RepeatNode.getOrderBy, RepeatNode.getReverse): New. Accessor
	methods for the new attributes.
	(RepeatNode.getDigest): Interpret the string value as a list of
	whitespace separated field names and return the list of field
	names.

2011-02-22  Bernhard Herzog  <bh@intevation.de>

	* formed/renderer/html.py (RepeatGroupRenderer): Add a doc-string,
	so that we have at least one place where the digest specifications
	are documented.

2011-02-22  Bernhard Herzog  <bh@intevation.de>

	* formed/instance/backends/common.py
	(AbstractInstanceTree.setData): Fix inconsistent indentation.

2011-02-22  Bernhard Herzog  <bh@intevation.de>

	* formed/instance/backends/xmlimport.py (CasesHandler.__init__):
	Call the base-class __init__ method.

2011-02-22  Bernhard Herzog  <bh@intevation.de>

	During import, only check rules for fields that actually change
	Fixes part of mpuls/issue1762

	* formed/instance/backends/dbxmlimport.py
	(_copy_data_recursively): Only copy data that will actually be
	changed by the import. This way, only rules that refer to fields
	that are changed by the import will be evaluated. Previously
	imports that contained rule violations would be rejected even if
	performing the import would not actually change any of the data
	already in the databse. Now such imports are possible. However, if
	a value is changed and the new value will violate a rule, the
	import is still rejected.

2011-02-21  Bernhard Herzog  <bh@intevation.de>

	* formed/meta/io/parser.py (Creator.createFactory): Add missing
	self parameter. This method is never called, but it's overwritten
	in derived classes.

2011-02-21  Bernhard Herzog  <bh@intevation.de>

	* formed/meta/document.py: Add the missing import for RootNode.

2011-02-21  Bernhard Herzog  <bh@intevation.de>

	* formed/meta/structure.py
	(StructureTree.build_raw_structure_tree): Fix a variable reference
	in the code that raises exception for duplicated names.

2011-02-10  Bernhard Herzog  <bh@intevation.de>

	Move more error rendering from the applications into the renderer

	* formed/renderer/html.py (HtmlRenderer.error_info): New. Method
	to return information about errors and warnings associated with a
	field for rendering.
	(HtmlRenderer.render_errors): Implement this so that derived
	classes do not have to duplicate the implementation. They only
	have to override error_info now.

2011-02-10  Bernhard Herzog  <bh@intevation.de>

	* formed/renderer/html.py (Container.render)
	(ChoiceContainer.render): Remove unused parameter doBreak.

2011-02-10  Bernhard Herzog  <bh@intevation.de>

	Use getValueMapping method in RepeatGroupRenderer.get_field_info

	* formed/renderer/html.py (RepeatGroupRenderer.get_field_info):
	Use the getValueMapping method of choice nodes to determine the
	description instead of replicating the child traversal yet again.

2011-02-10  Bernhard Herzog  <bh@intevation.de>

	Use ChoiceNode.get_options in ChoiceNode.getValueMapping

	* formed/meta/data.py (ChoiceNode.getValueMapping): Use
	get_options instead of duplicating the child traveral code.

2011-02-10  Bernhard Herzog  <bh@intevation.de>

	Make ChoiceNode.getValueMapping cache the generated mapping

	* formed/meta/data.py (ChoiceNode.__init__): New instance variable
	option_mapping to cache the list of options generated by
	getValueMapping
	(ChoiceNode.getValueMapping): Cache the option mapping so that it
	doesn't have to be generated over and over again.

2011-02-10  Bernhard Herzog  <bh@intevation.de>

	Make ChoiceNode.get_options cache the generated option list

	* formed/meta/data.py (ChoiceNode.__init__): New instance variable
	options to cache the list of options generated by get_options
	(ChoiceNode.get_options): Cache the list of options so that it
	doesn't have to be generated over and over again.

2011-02-10  Bernhard Herzog  <bh@intevation.de>

	* formed/renderer/html.py (RepeatGroupRenderer.render_digest):
	Escape digest value properly.

2011-02-10  Bernhard Herzog  <bh@intevation.de>

	* formed/renderer/helpers.py (tag): Fix import in the example in
	the doc-string.  It still referred to mpulsweb instead of
	libformed.

2011-02-09  Bernhard Herzog  <bh@intevation.de>

	Add FormData implementation for full instance trees.

	* formed/renderer/html.py (TreeFormData): New. A FormData
	implementation for full instance trees.
	(repeat_id): New. Helper function for TreeFormData

2011-02-09  Bernhard Herzog  <bh@intevation.de>

	* formed/renderer/html.py (HtmlRenderer.render_choice_nc): Handle
	conditionals, too.

2011-02-09  Bernhard Herzog  <bh@intevation.de>

	Split the main logic of render_conditional into a new method.

	* formed/renderer/html.py (HtmlRenderer.do_render_conditional):
	New. Contains the main logic from render_conditional in a more
	generic way to prepare for conditionals in choice lists.
	(HtmlRenderer.render_conditional): Implement using
	do_render_conditional

2011-02-09  Bernhard Herzog  <bh@intevation.de>

	Make the render_conditional implementation more generic
	to prepare for rendering conditionals in choice lists.

	* formed/renderer/html.py (ConditionalContext): New. Special
	version of the RendererContext for use with conditionals. This
	will make the implementation a bit more generic as we can now
	return something from render_conditional.
	(HtmlRenderer.render_conditional): Use ConditionalContext and
	return the value returned by render_children.

2011-02-09  Bernhard Herzog  <bh@intevation.de>

	* formed/renderer/html.py (HtmlRenderer.render_conditional):
	Refactor. Now there's only one if-statement instead of two and
	only one call to render_children, and the logic is a bit clearer.

2011-02-09  Bernhard Herzog  <bh@intevation.de>

	* formed/renderer/helpers.py (format_date): Removed. No longer
	used.

	* formed/renderer/html.py: Do not import format_date anymore.
	It's been removed and it's not used anymore.

2011-02-09  Bernhard Herzog  <bh@intevation.de>

	* formed/renderer/html.py: Remove unused imports

2011-02-08  Bernhard Herzog  <bh@intevation.de>

	Use the formatter object in RepeatGroupRenderer

	* formed/renderer/html.py (RepeatGroupRenderer.get_field_info):
	Use self.formatter to format values for date and numeric
	fields. Now numeric values are rendered properly in the repeat
	group digests (e.g. with comma instead of period in german
	locales).

2011-02-08  Bernhard Herzog  <bh@intevation.de>

	Use LocaleAwareFormatter in BaseRenderer

	* formed/renderer/html.py (BaseRenderer.__init__): Instantiate the
	LocaleAwareFormatter class and make it available to instances as
	the formatter instance variable.
	(BaseRenderer.format_numeric, BaseRenderer.format_date): Call the
	appropriate self.formatter method when formatting decimal
	resp. date objects.

2011-02-08  Bernhard Herzog  <bh@intevation.de>

	Add LocaleAwareFormatter class to make formatting more flexible

	* formed/renderer/html.py (LocaleAwareFormatter): New. Class to
	help make formatting number and date formatting more flexible in
	the renderers. This particular version formats according to the
	current locale like the web-applications currently do.

2011-02-08  Bernhard Herzog  <bh@intevation.de>

	Prepare for more flexible and systematic date formatting

	* formed/renderer/html.py (BaseRenderer.format_date): New method
	to format a date value, taking special cases like None and
	UNKNOWN_NUMERIC into account.
	(HtmlRenderer.render_date): Use the new format_date method to
	format the value.

2011-02-08  Bernhard Herzog  <bh@intevation.de>

	Prepare for more flexible and systematic numeric formatting

	* formed/renderer/html.py (BaseRenderer.format_numeric): New
	method to format a numeric value, taking special cases like None
	and UNKNOWN_NUMERIC into account.
	(HtmlRenderer.render_numeric): Use the new format_numeric method
	to format the value.

2011-02-08  Bernhard Herzog  <bh@intevation.de>

	* formed/renderer/html.py (HtmlRenderer.render_numeric): Use the
	new constant UNKNOWN_NUMERIC instead of creating it here.

2011-02-08  Bernhard Herzog  <bh@intevation.de>

	* formed/meta/__init__.py (UNKNOWN_NUMERIC): New. Constant for the
	unknown value in analogy to UNKNOWN_INT etc.

2011-02-04  Bernhard Herzog  <bh@intevation.de>

	* scripts/printcanonicalspec.py (print_canonical_structure_node):
	Print the anonymization function, too.

2011-02-03  Bernhard Herzog  <bh@intevation.de>

	Strip whitespace and treat UUIDs as case-insensitive during import
	Fixes part of mpuls/issue1762

	* formed/instance/backends/xmlimport.py (decode_uuid): New
	function to decode UUIDs from the XML files.
	(CaseHandler.endElement): Use decode_uuid to convert the UUIDs to
	the internal representation.

2011-02-02  Bernhard Herzog  <bh@intevation.de>

	* scripts/printcanonicalspec.py: New. Script to print a text
	representation of the a formed XML file that can be easily
	compared with a similar representation extracted from an
	OpenOffice document.

2011-02-02  Bernhard Herzog  <bh@intevation.de>

	* formed/meta/data.py (ChoiceNode.get_options): New method to
	return a list of value, description) tuples with all options of
	the choice node. Unlike the existing method getValueMapping which
	returns a dictionary, get_options maintains the order of the
	individual choices.

2011-01-19  Bernhard Herzog  <bh@intevation.de>

	* formed/i18n/de/LC_MESSAGES/libformed.po: Update from formed.pot
	and translate new strings.

2011-01-19  Bernhard Herzog  <bh@intevation.de>

	* formed/i18n/libformed.pot: Regenerate.

2011-01-19  Bernhard Herzog  <bh@intevation.de>

	* formed/renderer/html.py (HtmlRenderer.render_numeric)
	(HtmlRenderer.render_int): Internationalize the "unknown" string.

2011-01-19  Bernhard Herzog  <bh@intevation.de>

	* formed/renderer/html.py (HtmlRenderer.render_date): Handle case
	where the date value already is a string.  If the user enters a
	date that cannot be parsed, it's stored as a semantic error, and
	when using FormData objects with shadow dicts for the erroneous
	values are used, the FormData get_value method may return a string
	and not a date object.

2011-01-18  Bernhard Herzog  <bh@intevation.de>

	Fix getting all instances of an RG from a StructureInstanceNode

	* formed/instance/simplified.py (StructureInstanceNode.get):
	Handle case where the local name refers to a repeat group
	correctly.  Also simplifies the logic in general a little.

2011-01-18  Bernhard Herzog  <bh@intevation.de>

	Remove RepeatGroupRenderer.get_conditional_parents

	* formed/renderer/html.py
	(RepeatGroupRenderer.get_conditional_parents): Removed. No longer
	used.
	(RepeatGroupRenderer.get_field_info): Use the function
	conditional_parents from formed.meta.document instead of the
	get_conditional_parents method.  Both are equivalent for the
	purposes of get_field_info

2011-01-18  Bernhard Herzog  <bh@intevation.de>

	Make translatations work for the offline client and py2exe

	* formed/renderer/html.py (set_i18n_basedir): New.  Set the
	directory where libformed looks for the gettext dialogs.  Should
	only be needed in special circumstances, like the offline client
	which uses py2exe.
	(load_catalog): Use the directory set by set_i18n_basedir.

2011-01-14  Bernhard Herzog  <bh@intevation.de>

	Port part of the error message code from offline-client to libformed

	* formed/renderer/html.py (StructureFormData.__init__): New
	parameter and instance variable errors for error messages
	associated with form items.
	(StructureFormData.has_errors): Implement by consulting the errors
	dictionary.
	(StructureFormData.get_errors): New.  Return the error messages
	associated with an item.

2011-01-14  Bernhard Herzog  <bh@intevation.de>

	* formed/renderer/html.py (StructureFormData.__init__): Add
	parameter and instance variable shadow for values that should show
	up in the form but are not (yet) actually part of the instance
	tree.
	(StructureFormData.get_value): Consult the shadow dictionary
	before lookup up values in the instance tree.

2011-01-14  Bernhard Herzog  <bh@intevation.de>

	* formed/renderer/html.py (FormData.has_errors): Add doc-string.

2011-01-13  Bernhard Herzog  <bh@intevation.de>

	* formed/renderer/html.py (apply_hidden_booleans): New.  Copied
	from mpuls base.  Slightly extended by allowing the caller to
	specify the value that is used for the missing booleans.  Also,
	the doc-string was corrected and updated.

2011-01-13  Bernhard Herzog  <bh@intevation.de>

	* formed/renderer/html.py (BaseRenderer.render_page_headings):
	Escape the heading text properly.

2011-01-13  Bernhard Herzog  <bh@intevation.de>

	* formed/renderer/html.py (BaseRenderer.render_page_headings):
	New.  Render the headings for pages containing the form.

2011-01-13  Bernhard Herzog  <bh@intevation.de>

	Move HtmlRenderer.render_attributes to BaseRenderer

	* formed/renderer/html.py (BaseRenderer.render_annotation_links)
	(HtmlRenderer.render_attributes): Move render_attributes to
	BaseRenderer and rename it to the more fitting
	render_annotation_links.  Also, remove the unused context
	parameter.
	(HtmlRenderer.render_text, HtmlRenderer.render_text_area)
	(HtmlRenderer.render_choice, HtmlRenderer.render_date)
	(HtmlRenderer.render_numeric, HtmlRenderer.render_int)
	(HtmlRenderer.render_bool, HtmlRenderer.render_radio)
	(HtmlRenderer.render_radio_matrix, HtmlRenderer.render_group)
	(HtmlRenderer.render_inline_repeat_group): Adapt to
	render_attributes change.

2011-01-11  Bernhard Herzog  <bh@intevation.de>

	* formed/i18n/de/LC_MESSAGES/libformed.po: New. Added german
	translations

2011-01-11  Bernhard Herzog  <bh@intevation.de>

	Implement proper i18n support in the renderer

	* formed/renderer/html.py (_, ungettext): Removed.  No longer
	needed with the proper i18n support.
	(load_catalog): New.  Load the libformed message catalog
	(BaseRenderer.__init__): New parameter languages.  Use it to load
	the corresponding message catalog.
	(BaseRenderer.gettext, BaseRenderer.ungettext): New methods.
	Equivalents of the gettext functions that delegate to the catalog
	object instantiated in the constructor.
	(HtmlRenderer.__init__, RepeatGroupRenderer.__init__)
	(ErrorRenderer.__init__): New parameter languages.  Passed through
	to the base class.
	(HtmlRenderer.render_submit_buttons)
	(HtmlRenderer.render_inline_rg_delete_button)
	(HtmlRenderer.render_inline_rg_create_button)
	(RepeatGroupRenderer.render, ErrorRenderer.render)
	(ErrorRenderer.render_items): Use the base class methods gettext
	and ungettext instead of the global functions _ and ungettext

2011-01-11  Bernhard Herzog  <bh@intevation.de>

	* formed/i18n/libformed.pot: New.  Initial translations template

2011-01-11  Bernhard Herzog  <bh@intevation.de>

	Prepare for i18n.

	* setup.cfg: New.  Defaults for babel message handling.

	* setup.py: Define message extractors

2011-01-11  Bernhard Herzog  <bh@intevation.de>

	* formed/renderer/html.py (ErrorRenderer): Derive from
	BaseRenderer.

2011-01-11  Bernhard Herzog  <bh@intevation.de>

	* formed/renderer/html.py (RepeatGroupRenderer.get_field_info):
	Fix evaluation of conditionals.  There's no instance tree, use
	self.data instead

2011-01-11  Bernhard Herzog  <bh@intevation.de>

	* formed/instance/simplified.py
	(StructureInstanceNode.default_repeat_groups): There's no need to
	convert the return value of RepeatNode.getMin to int anymore.

2011-01-11  Bernhard Herzog  <bh@intevation.de>

	* formed/meta/data.py (RepeatNode.getMin): Always return an int.
	This way we don't have to convert to int explicitly and we don't
	have to deal with special cases like empty strings elsewhere.

2011-01-11  Bernhard Herzog  <bh@intevation.de>

	* formed/renderer/html.py (RepeatGroupRenderer.render): Fix error
	message for missing digest specifications

2011-01-11  Torsten Irlaender <torsten@intevation.de>

	* formed/meta/exprtree.py: Added code to implement list operators.
	Added "[" token to start lists. Added "]" token to Start building the
	list.  Added new function "CONTAINS" to check if a given element is in
	a list.
	* formed/meta/semantic.py (ChoiceChecker.check): Added ConditonalNode
	to ChoiceChecker to travese Conditional Nodes too to find valid Values
	in the Choice.
	* formed/instance/backends/common.py
	(AbstractInstanceTree.evaluate_conditional): Added addiotional
	Paramter "ident" which is used if the Conditonal is a meta object an
	does not have a Identifier. (e.g for conditionals in Choice lists)

2011-01-07  Bernhard Herzog  <bh@intevation.de>

	* formed/renderer/html.py (HtmlRenderer.get_warnings): New. Return
	the warning messages for a form item.

2011-01-07  Bernhard Herzog  <bh@intevation.de>

	Make ErrorRenderer.render_items more flexible for inconsistencies

	* formed/renderer/html.py (ErrorRenderer.render_items): New
	optional parameter item_url_function which will be used to
	determine the URLs that links to form elements.  If omitted the
	new method error_item_url will be used.  This will be used in the
	offline client to render inconsistencies
	(ErrorRenderer.error_item_url): New.  Return the URL for a form
	element

2011-01-06  Bernhard Herzog  <bh@intevation.de>

	Add StructureInstanceTree.iter_all_items

	* formed/instance/simplified.py
	(StructureInstanceTree.iter_all_items): New method to yield all
	values in the tree as key, value pairs.

2011-01-05  Bernhard Herzog  <bh@intevation.de>

	* formed/renderer/html.py (HtmlRenderer.render_bool): Pass the
	class_ keyword parameter only once to the tag call.

2011-01-05  Bernhard Herzog  <bh@intevation.de>

	Move the DB XML import code into a separate module

	* formed/instance/backends/dbxmlimport.py,
	formed/instance/backends/xmlimport.py (DBXMLImporter)
	(update_instance_in_database, copy_to_full_instance_tree)
	(_copy_data_recursively): Moved these classes and functions from
	xmlimport to the new module dbxmlimport and adapt imports.  Now
	the xmlimport module does not depend on the postgres module
	anymore.  This is important for the offline client which should
	not depend on the postgresql DB-API modules.

2011-01-05  Bernhard Herzog  <bh@intevation.de>

	Split XMLImporter into generic and DB specific parts

	* formed/instance/backends/xmlimport.py (XMLImporter)
	(DBXMLImporter): Split XMLImporter into the database specific
	parts in the new DBXMLImporter class and the more generic parts
	which remain in XMLImporter.

2011-01-05  Bernhard Herzog  <bh@intevation.de>

	* formed/renderer/html.py (HtmlRenderer.render_label): Use the new
	error_css_class method here as well

2011-01-05  Bernhard Herzog  <bh@intevation.de>

	Set error/warning css class on form elements in HtmlRenderer

	* formed/renderer/html.py (HtmlRenderer.error_css_class): New
	method to determine the css class to use for a given formed item
	based on errors and warnings referring to that item.
	(HtmlRenderer.render_text, HtmlRenderer.render_text_area)
	(HtmlRenderer.render_choice, HtmlRenderer.render_date)
	(HtmlRenderer.render_numeric, HtmlRenderer.render_int)
	(HtmlRenderer.render_bool, HtmlRenderer.render_radio)
	(HtmlRenderer.render_radio_matrix): Use error_css_class to set the
	CSS class for the form elements.

2011-01-05  Bernhard Herzog  <bh@intevation.de>

	Fix label rendering for radio matrices in HtmlRenderer

	* formed/renderer/html.py (HtmlRenderer.render_radio_matrix): Fix
	rendering of labels for radio matrices.  Now the links to the
	matrix rows that may be generated for e.g. warnings for missing
	required fields actually work.

2011-01-04  Bernhard Herzog  <bh@intevation.de>

	Adapt HtmlRenderer.render_items to check_warnings changes

	* formed/renderer/html.py (ErrorRenderer.render_items): Convert
	the full name to the form name when creating the url for the
	items.

2011-01-04  Bernhard Herzog  <bh@intevation.de>

	* formed/renderer/html.py
	(StructureFormData.form_name_from_full_name): New. Classmethod to
	determine the form name for an item given its full name

2011-01-04  Bernhard Herzog  <bh@intevation.de>

	Adapt HtmlRenderer.has_warnings to check_warnings changes

	* formed/renderer/html.py (HtmlRenderer.has_warnings): Use the
	full item name when checking for warnings.  Adapting has_warnings
	was forgotten when check_warnings was changed to use the full item
	name.

2010-12-23  Bernhard Herzog  <bh@intevation.de>

	* formed/instance/backends/xmlimport.py
	(copy_to_full_instance_tree): Fix mpuls/issue1592 correctly: Call
	setData with find_best_changes set to False.  The previous commit
	accidentally called it with find_best_changes set to True.

2010-12-22  Bernhard Herzog  <bh@intevation.de>

	Build a name2page dictionary in the formed meta document

	* formed/meta/document.py (Document.buildIndices): Build the
	name2page dictionary and make it available as an instance
	variable.
	(containing_page): New. Helper function for building the name2page
	dictionary

2010-12-22  Bernhard Herzog  <bh@intevation.de>

	Use full instance item names in the renderer's warnings dicts

	* formed/renderer/html.py (HtmlRenderer.check_warnings): Use the
	full instance item name as the key for the warnings and notices
	dictionary.  This makes those dictionaries compatible with the
	errors dictionary in the offline client and works with the
	previous change in ErrorRenderer.render_items

2010-12-22  Bernhard Herzog  <bh@intevation.de>

	Make ErrorRenderer work with errors of structure instance trees

	* formed/renderer/html.py (ErrorRenderer.__init__): Require a
	FormData instance as parameter, too.
	(ErrorRenderer.render_items): Use the form data intance to
	translate an instance item name into a meta item, instead of using
	inline code that only works for the full instance tree, but not
	the structure instance tree.

2010-12-22  Bernhard Herzog  <bh@intevation.de>

	Add FormData method to get meta item for a full instance item name

	* formed/renderer/html.py (FormData.get_meta_node_from_item_name)
	(StructureFormData.get_meta_node_from_item_name): New.  Method to
	get the meta item for a full instance item name.

2010-12-22  Bernhard Herzog  <bh@intevation.de>

	Adapt FormData.evaluate_warnings to full_item_name change

	* formed/renderer/html.py (FormData.evaluate_warnings): Take
	advantage of the change that the full_item_name method now accepts
	meta items directly.

2010-12-22  Bernhard Herzog  <bh@intevation.de>

	Allow a meta item as parameter in FormData.full_item_name

	* formed/renderer/html.py (FormData.full_item_name): Allow a meta
	item in addition to a name as parameter here as well
	(StructureFormData.full_item_name): Adapt implementation to above
	change: allow a meta item as parameter too.

2010-12-22  Bernhard Herzog  <bh@intevation.de>

	Document where meta items or names may be used in FormData

	* formed/renderer/html.py (FormData.get_value)
	(FormData.get_repeat_group, FormData.get_id): Document that the
	parameter meta may either be a formed meta item or its name.

2010-12-20  Bernhard Herzog  <bh@intevation.de>

	Assign UUIDs to new repeat groups in structure instance trees

	* formed/instance/simplified.py
	(StructureInstanceNode.create_repeat_group): Assign a UUID to the
	new repeat group instance

2010-12-20  Bernhard Herzog  <bh@intevation.de>

	Add methods to assign new UUIDs to structure instance trees

	* formed/instance/simplified.py (StructureInstanceNode.make_unique)
	(StructureInstanceTree.make_unique): New.  Assign new uuids to the
	nodes recursively.

2010-12-20  Bernhard Herzog  <bh@intevation.de>

	* formed/instance/backends/xmlexport.py: New.  Implement XML
	export for structure instance trees

2010-12-20  Bernhard Herzog  <bh@intevation.de>

	Preserve the widget order in the structure tree for the XML export

	* formed/meta/structure.py (StructureNode.__init__): Turn the
	arguments that specify the meta leaves and repeat groups into
	sequences so that their order can be preserved.
	(StructureTree.build_raw_structure_tree)
	(StructureTree.convert_raw_tree_dict)
	(StructureTree.build_structure_tree): Preserve the order of the
	leaves and repeat nodes.

2010-12-20  Bernhard Herzog  <bh@intevation.de>

	* formed/meta/structure.py (structure_path): Refine doc-string.

2010-12-17  Bernhard Herzog  <bh@intevation.de>

	* formed/renderer/html.py: New.  First version of an HTML renderer
	usable by both the web-application and the offline client.  It's a
	combination of the renderer from the webapplication and the one
	from the offline client.

2010-12-17  Bernhard Herzog  <bh@intevation.de>

	* formed/renderer/helpers.py: New.  Helper functions for the
	renderers

2010-12-17  Bernhard Herzog  <bh@intevation.de>

	Use the logging module where appropriate

	* formed/instance/backends/postgres.py (buildChildren): Use the
	logging module to output warnings instead of writing directly to
	stderr.

	* formed/instance/backends/xmlimport.py (decode)
	(copy_to_full_instance_tree): Use the logging module to output
	warnings instead of writing directly to stderr.

	* formed/meta/data.py (IntLeaf.firstFindDefault)
	(NumericLeaf.firstFindDefault, DateLeaf.firstFindDefault): Use the
	logging module to output warnings instead of writing directly to
	stderr.

	* formed/meta/document.py (Document.buildIndices.callback)
	(Document.validate_expr_dependencies)
	(Document.validate_conditional_dependencies): Use the logging
	module to output warnings instead of writing directly to stderr.

	* formed/meta/exprtree.py (Expr.evaluate_instances): Use the
	logging module to output warnings instead of writing directly to
	stderr.

2010-12-17  Bernhard Herzog  <bh@intevation.de>

	Prepare logging support in libformed

	* formed/__init__.py: Initialize the "formed" logger with a null
	handler as recommended in the Python documentation for libraries
	that use logging.  This avoids warning messages from the Python
	logging module when logging messages without any logging
	configuration

2010-12-17  Bernhard Herzog  <bh@intevation.de>

	* formed/renderer/navigation.py: New.  Basic support for
	navigation trees.  Only contains the TreeItem base class_page for
	now.

2010-12-17  Bernhard Herzog  <bh@intevation.de>

	* formed/renderer/__init__.py: New.  Create the formed.renderer
	sub-package.

2010-12-17  Bernhard Herzog  <bh@intevation.de>

	* formed/instance/backends/common.py (rule_available)
	(AbstractInstanceTree.rule_available): Move the implementation of
	rule_available from the method to the new function of the same
	name to make it more independend of the instance tree
	implementation.

2010-12-17  Bernhard Herzog  <bh@intevation.de>

	* formed/instance/simplified.py (StructureVariableProvider): New.
	Implements the VariableProvider interface for the structure
	instance tree.

2010-12-17  Bernhard Herzog  <bh@intevation.de>

	* formed/instance/backends/common.py (evaluate)
	(AbstractInstanceTree.evaluate): Move the functionality of
	AbstractInstanceTree.evaluate to the new function evaluate.  Use
	the new function to implement AbstractInstanceTree.evaluate.

2010-12-17  Bernhard Herzog  <bh@intevation.de>

	* formed/instance/simplified.py
	(StructureInstanceNode.create_repeat_group)
	(StructureInstanceNode.delete_repeat_group): New.  Methods to
	create and delete repeat group instances.

2010-12-17  Bernhard Herzog  <bh@intevation.de>

	* formed/instance/simplified.py (StructureInstanceNode.default_leaves)
	(StructureInstanceNode.default_repeat_groups): New methods to
	create default dictionaries with the leaves and repeat groups for
	the constructor.
	(StructureInstanceNode.__init__): Use the new methods
	default_leaves and default_repeat_groups to create the leaves and
	repeat_groups dictionaries if they were not provided as arguments.

2010-12-17  Bernhard Herzog  <bh@intevation.de>

	* formed/instance/backends/xmlimport.py (CaseHandler.endElement):
	Set the id of repeat group instances.  For convenience, we use the
	python id of the node object.

2010-12-17  Bernhard Herzog  <bh@intevation.de>

	Do not try to find a maximal changeset when importing.  It's not
	really useful when importing and it can consume a lot of CPU time
	and memory when rules are violated.

	Fixes mpuls/issue1592

	* formed/instance/backends/common.py
	(AbstractInstanceTree.evaluate): Add parameter find_best_changes.
	If true and rules are violated, the method tries to determine a
	maximal subset of the changes that still conforms to the rules.
	The default value is True so that the method behaves as before by
	default.
	(AbstractInstanceTree.setData): Add parameter find_best_changes
	with the default value True.  This is simply passed through to
	evaluate.

	* formed/instance/backends/xmlimport.py
	(copy_to_full_instance_tree): Call setData with find_best_changes
	set to False.

2010-12-09  Bernhard Herzog  <bh@intevation.de>

	* formed/meta/structure.py (StructureNode.__init__)
	(StructureTree.convert_raw_tree_dict): Instantiate the structure
	node with the corresponding RepeatNode instance instead of just
	the name.  This gives the code more information such as the
	minimum and maximum number of instances a repeat group is allowed
	to have.  This also adds meta_node as a new public attribute to
	the StructureNode instances.

2010-12-09  Bernhard Herzog  <bh@intevation.de>

	Allow setting leaf values in the structure instance tree.

	* formed/instance/simplified.py (StructureInstanceNode.set_leaf):
	New. Setter method corresponding to get_leaf
	(StructureInstanceNode.set_value): New. Set a value in a leaf or a
	repeat group
	(StructureInstanceTree.set_value): New. Tree-level equivalent of
	the node's set_value method.

2010-12-09  Bernhard Herzog  <bh@intevation.de>

	* formed/instance/simplified.py (StructureInstanceTree.get_all):
	New.  Return the values of all instances of a leaf.  This is the
	core of the implementation of VariableProvider.getAllValuesForVar
	for the structure instance tree.

2010-12-09  Bernhard Herzog  <bh@intevation.de>

	Allow structure instance item names to refer to repeatgroups as
	such

	* formed/instance/simplified.py (StructureInstanceNode.get): Adapt
	to change in full item name specification and add support for
	names specifying a repeat group as such, and not a leaf in a
	repeat group
	(StructureInstanceTree.get): Document the different ways to
	specify an item in the structure instance tree.
	(StructureInstanceTree.full_name): Implement the changed
	specification which now allows names that refer to repeat groups
	and not just leaves

2010-12-09  Bernhard Herzog  <bh@intevation.de>

	* formed/instance/simplified.py
	(StructureInstanceTree.parse_legacy_name): Add doc-string

2010-12-09  Bernhard Herzog  <bh@intevation.de>

	Collect the structure paths of repeat nodes, too.

	* formed/meta/structure.py
	(StructureWidgetCollector.handleReapeatNode): Collect the repeat
	nodes themselves, too.
	(StructureTree.build_raw_structure_tree): Handle the repeat nodes
	by storing their structure paths but doing nothing else.

2010-12-08  Bernhard Herzog  <bh@intevation.de>

	* formed/meta/data.py (WidgetCollector.visitor)
	(WidgetCollector.handleRepeatNode): Fix spelling of
	handleRepeatNode.  It used to be spelled handleReapeatNode.

	* formed/meta/structure.py
	(StructureWidgetCollector.handleRepeatNode),
	formed/instance/backends/postgres.py
	(PageFilteredWidgetCollector.handleRepeatNode): Adapt to new and
	correct spelling of handleRepeatNode

2010-12-08  Bernhard Herzog  <bh@intevation.de>

	* formed/meta/exprtree.py (VariableProvider.getValueForVar)
	(VariableProvider.getAllValuesForVar): Add doc-strings and adapt
	return values by these default implementations to what's actually
	expected by the callers and what's documented now.

2010-12-08  Bernhard Herzog  <bh@intevation.de>

	* formed/instance/simplified.py
	(StructureInstanceTree.instantiate_root): Add missing self
	argument.

2010-11-30  Bernhard Herzog  <bh@intevation.de>

	* formed/instance/simplified.py
	(StructureInstanceNode.get_repeat_group): Make it work correctly:
	use the name of the rg to get the dictionary with the instances.

2010-11-25  Bernhard Herzog  <bh@intevation.de>

	Allow date-specifications with only the year.  Fixes mpuls/issue1350

	* formed/meta/semantic.py (DateChecker.DATE_YEAR_ONLY): New.
	Regular expression that matches a date-specification that only
	contains a four digit year.
	(DateChecker.convert): Handle regular expressions that don't
	contain the day or month group.  Use 1 instead in both cases.  Now
	a date-specification that only contains the year is equivalent to
	specifying January 1st of that year.

2010-11-25  Bernhard Herzog  <bh@intevation.de>

	* formed/meta/semantic.py (DateChecker.DATE)
	(DateChecker.DATE_ISO): Use named groups in the regular
	expressions.
	(DateChecker.DATE_IDX, DateChecker.DATE_ISO_IDX): Removed.  Not
	needed anymore because we now use named groups.
	(DateChecker.convert): Adapt to the named groups in the regular
	expressions

2010-10-27  Bernhard Herzog  <bh@intevation.de>

	* formed/instance/backends/xmlimport.py (XMLImporter.__init__):
	New parameter extra_factories for additional case component
	factories, for instance for importing the logbook.

2010-10-27  Bernhard Herzog  <bh@intevation.de>

	* formed/instance/backends/xmlimport.py (ComponentFactory): New
	class to hold the factories for the various case components, like
	master table and logbook.
	(CaseHandler.__init__): Accept a dictionary of ComponentFactory
	instances instead of a structure tree.
	(CaseHandler.get_instance): The case instance is now a dictionary
	mapping the keys from the component_factories dict given to the
	constructor to the instance tree created for that component if it
	actually was present in the XML file.
	(CaseHandler.startElement, CaseHandler.endElement): Handle the
	components in a more generic way.  There's no need anymore to
	special-case the 'master' element.  Use the component's factories
	to create the instance parts.
	(CaseHandler.create_instance_node): Use the component's factories
	to create the instance node.
	(XMLImporter.__init__): Create the default case factories, which
	is only a factory for the 'master' element which is mapped to the
	factories that create the structure instance tree based on the
	meta_tree given to the constructor.
	(XMLImporter.import_case): The case is now actually a dict as
	returned from the CaseHandler.get_instance method.  Import the
	'master' component.
	(CasesHandler.startElement): Adapt to XMLImporter changes.

2010-10-27  Bernhard Herzog  <bh@intevation.de>

	* formed/instance/backends/xmlimport.py (CasesHandler.__init__)
	(CasesHandler.startElement): Don't store the structure_tree in an
	instance variable in __init__, take it directly from the
	xml_importer in startElement.

2010-10-27  Bernhard Herzog  <bh@intevation.de>

	* formed/instance/backends/xmlimport.py
	(CaseHandler.get_instance): new method to abstract how the newly
	created case is stored in the CaseHandler instance.
	(CasesHandler.endElement): Use get_instance instead of accessing
	the instance variables of the CaseHandler instance directly.

2010-10-25  Torsten Irlaender <torsten@intevation.de>

	* setup.py: Set version number to 0.5.5 

2010-10-22  Bernhard Herzog  <bh@intevation.de>

	* formed/instance/backends/xmlimport.py (XMLImporter.import_case):
	Document return value

2010-10-22  Bernhard Herzog  <bh@intevation.de>

	* formed/instance/backends/xmlimport.py
	(update_instance_in_database): Return the destination instance
	tree, so that the caller may use e.g. its case id for further
	database accesses.

2010-10-22  Bernhard Herzog  <bh@intevation.de>

	* formed/instance/backends/xmlimport.py (XMLImporter.import_xml):
	Update doc-string.

2010-10-22  Bernhard Herzog  <bh@intevation.de>

	* formed/instance/backends/xmlimport.py
	(XMLImporter.import_allowed): Removed.  No longer needed.

2010-10-22  Bernhard Herzog  <bh@intevation.de>

	* formed/instance/backends/xmlimport.py (XMLImporter.import_case):
	New.  Handle import of a particular case read from the XML file.
	May be extended by derived classes.
	(XMLImporter.import_xml): Use import_case instead of
	import_allowed.  import_case is more flexible and will allow
	derived classes to e.g. import more information into the database.

2010-10-15  Bernhard Herzog  <bh@intevation.de>

	* formed/instance/backends/xmlimport.py
	(CaseHandler.create_instance_node): Allow import of anonymized
	cases.

2010-10-12  Bernhard Herzog  <bh@intevation.de>

	* formed/meta/semantic.py (DateChecker.convert): Add format hint
	to the other error message which indicates an error in the actual
	numerical values for day, month or year.

2010-10-11  Bernhard Herzog  <bh@intevation.de>

	* formed/meta/semantic.py (DateChecker.convert): Rephrase message
	for incorrectly formatted dates and make sure it's a unicode
	string.  Also for mpuls/issue1250

2010-10-08  Bernhard Herzog  <bh@intevation.de>

	* formed/meta/semantic.py (DateChecker.convert): Mention accepted
	date format in error message for incorrectly formatted dates.
	Fixes mpuls/issue1250

2010-09-16  Torsten Irländer <torsten.irlaender@intevation.de>

	* setup.py: Set version number to 0.5.4

2010-09-13  Bernhard Herzog  <bh@intevation.de>

	* formed/instance/backends/xmlimport.py
	(copy_to_full_instance_tree): Actually commit the changes to the
	destination instance tree.  The commit was accidentally removed in
	revision 209:efef2d1727d3.  Fixes mpuls/issue1118

2010-09-13  Bernhard Herzog  <bh@intevation.de>

	* formed/instance/backends/xmlimport.py (_copy_data_recursively):
	Ignore InfoLeaf widgets

2010-08-13  Torsten Irländer <torsten.irlaender@intevation.de>

	* formed/meta/data.py (ChoiceNode.getValueMapping): Added function
	which build a map of the values of choice-list options to their
	description.

2010-08-11  Bernhard Herzog  <bh@intevation.de>

	* setup.py: Fix spelling of author name

2010-08-03  Bernhard Herzog  <bh@intevation.de>

	Implement rudimentary support for formed version checks in XML
	import

	* formed/instance/backends/xmlimport.py
	(CasesHandler.startElement): Call the XMLImporter instance's
	version_supported method to check the formed version of the case
	being imported.
	(XMLImporter.version_supported): extend doc-string a bit to
	explain what derived classes should do

2010-08-03  Bernhard Herzog  <bh@intevation.de>

	* formed/instance/backends/xmlimport.py (XMLImporter.import_xml):
	Acquire cursor for import_allowed calls only once to make sure
	it's properly closed.

2010-08-03  Bernhard Herzog  <bh@intevation.de>

	* formed/instance/backends/xmlimport.py
	(CaseHandler.create_instance_node): Explicitly check for
	anonymized data which doesn't contain uuids and raise an
	XMLImportException when such cases are encountered during import.

2010-08-03  Bernhard Herzog  <bh@intevation.de>

	* formed/instance/backends/xmlimport.py
	(copy_to_full_instance_tree): Use set_data to insert the data into
	the destination instance tree and convert SetDataException raised
	by that to XMLImportException that include the details of the
	SetDataException.
	(XMLImportException.__init__): Added to allow setting more than
	just a simple message

2010-08-03  Bernhard Herzog  <bh@intevation.de>

	* formed/instance/backends/common.py
	(AbstractInstanceTree.setData): Make the data conversion step
	optional: Add optional parameter convert with default value True.
	If false, the method expects the data to be already converted to
	the internal reprentation.  The data is still checked for semantic
	errors and rules.  If true, the method behaves as before and also
	converts the data.

2010-07-30  Bernhard Herzog  <bh@intevation.de>

	* formed/instance/backends/xmlimport.py: New.  Import cases from
	XML files previously exported by libformed.

2010-07-30  Bernhard Herzog  <bh@intevation.de>

	* formed/meta/nodecomponents.py (RootNode.getVersion): New.
	Accessor method for the version attribute.

	* formed/meta/document.py (Document.getVersion): New.  Accessor
	method for the version information of the formed document.

	* formed/meta/structure.py (StructureTree.get_version): New.
	Accessor method for the version information of the formed
	document.

	* formed/instance/backends/postgres.py
	(LIBFORMED_XML_CONTAINER_VERSION, XML_VERSION): Renamed
	XML_VERSION to LIBFORMED_XML_CONTAINER_VERSION to better reflect
	what that version information stands for.
	(DBFactory.toXML): Also store the formed-type

2010-07-30  Bernhard Herzog  <bh@intevation.de>

	* formed/meta/structure.py: New.  Classes implementing the meta
	structure tree.

2010-07-30  Bernhard Herzog  <bh@intevation.de>

	* formed/instance/backends/postgres.py
	(InstanceTreeBuilder.recursive_build): Use LazyRepeatInstanceNode
	for repeat group instances instead of DBRepeatInstanceNode.  The
	LazyRepeatInstanceNode allows retrieving the UUID out of the box.

2010-07-29  Torsten Irländer <torsten.irlaender@intevation.de>

	* formed/meta/data.py (BoolLeaf.__init__): Added "invisible" attribute
	to BoolLeafs. This can be used to hide options in choicelists. So the
	user can not select the value in the user interface. But the db will
	have this option so is ist still present in the db and can be used.
	* formed/meta/exprtree.py: Added days function, which returns number
	of days between two given dates

2010-07-28  Torsten Irländer <torsten.irlaender@intevation.de>

	* formed/instance/backends/common.py (best_changes): changes must be
	an iterable list. If no changes are applicable return an empty list.

2010-07-27  Bernhard Herzog  <bh@intevation.de>

	Provide a way to determine the uuid of a repeat group instance.
	The implementation is not ideal because it may require extra
	database round-trips.  it would perhaps be better to include the
	uuid in the case structure determined by the get_case_structure
	function.

	* formed/instance/backends/postgres.py (loadRepeatData):
	Optionally also load the uuid.
	(LazyRepeatInstanceNode.__init__): New instance variable uuid
	(LazyRepeatInstanceNode.getUUID): New.  Return the uuid of the
	instance, loading it if necessary.
	(LazyRepeatInstanceNode.loadData): Also load the uuid

2010-07-27  Bernhard Herzog  <bh@intevation.de>

	Incompatible tweaks to the database interface to better separate
	the mechanisms the base class provides from the concrete
	implementations in the derived-classes.

	* formed/instance/backends/database.py (DB.do_rollback)
	(DB.do_commit): New methods to be overwritten by derived classes
	to perform the actual rollback/commit
	(DB.rollback, DB.commit): Call self.do_rollback and self.do_commit
	respectively when the rollback/commit has to be done so that
	derived classes can overwrite those operations more easily while
	continuing to use the logic from the base class.

	* formed/instance/backends/postgres.py (PostgreSQLInterface.do_rollback)
	(PostgreSQLInterface.do_commit): Implement the new methods of the
	DB interface.

2010-07-27  Bernhard Herzog  <bh@intevation.de>

	* formed/instance/backends/postgres.py
	(LazyRepeatInstanceNode.__repr__): New.  A more informative repr
	for debugging purposes.

2010-07-26  Bernhard Herzog  <bh@intevation.de>

	* formed/instance/backends/postgres.py (master_id_from_uuid): New.
	Determine the master id from a uuid.
	(DBFactory.loadInstanceTreeByUUID): New.  Load an instance tree
	for a given uuid.

2010-07-26  Bernhard Herzog  <bh@intevation.de>

	* formed/instance/backends/database.py (DB): Extend the interface
	to allow for nested transactions.  Rename the existing methods to
	follow PEP-8 style

	* formed/instance/backends/postgres.py (PostgreSQLInterface): New.
	Extends the DB interface with a PostgreSQL specific
	implementation.  It's mainly intended for testing.  Applications
	using libformed may provide a different implementation.
	(loadRepeatData, DBRepeatInstanceContainerNode.createInstance)
	(DBRepeatInstanceContainerNode.deleteInstance)
	(DBInstanceTree.commit, DBFactory.createNewInstanceTree)
	(DBFactory.loadInstanceTreeByIdentifier, DBFactory.toXML): Adapt
	to new DB interface.  Use nested transaction support where
	necessary.

2010-07-23  Bernhard Herzog  <bh@intevation.de>

	* formed/meta/semantic.py (check): New function.  Like
	checkAndConvert, but only runs the semantic checks.  It doesn't
	convert.  The value to check has to have been converted already.

2010-07-23  Bernhard Herzog  <bh@intevation.de>

	Separate conversion and value checks in semantic.py

	Instead of one method for both (checkAndConvert) there are now
	two, check and convert, and the base-class method checkAndConvert
	and calls both.

	* formed/meta/semantic.py (ValueChecker.checkAndConvert)
	(ValueChecker.convert, ValueChecker.check): Add convert and check
	to implement the conversion and checking part, respectively.
	Implement checkAndConvert in terms of convert and check.
	(TextChecker): derive from ValueChecker
	(TextChecker.checkAndConvert, TextChecker.check)
	(TextChecker.convert): Split checkAndConvert into check and
	convert.  Use checkAndConvert from the base-class.
	(TextAreaChecker): derive from ValueChecker
	(TextAreaChecker.checkAndConvert, TextAreaChecker.convert): Rename
	from checkAndConvert and to convert, because it only does
	conversion.
	(IntChecker.checkAndConvert, IntChecker.convert)
	(IntChecker.check): Split checkAndConvert into check and
	convert.  Use checkAndConvert from the base-class.
	(NumNumericChecker.checkAndConvert, NumericChecker.convert)
	(NumericChecker.check): Split checkAndConvert into check and
	convert.  Use checkAndConvert from the base-class.
	(DateChecker.checkAndConvert, DateChecker.convert): Rename from
	checkAndConvert and to convert, because it only does conversion.
	(ChoiceChecker.checkAndConvert, ChoiceChecker.convert)
	(ChoiceChecker.check): Split checkAndConvert into check and
	convert.  Use checkAndConvert from the base-class.
	(RadRadioChecker.checkAndConvert, RadioChecker.convert)
	(RadioChecker.check): Split checkAndConvert into check and
	convert.  Use checkAndConvert from the base-class.
	(BoolChecker.checkAndConvert, BoolChecker.convert): Rename from
	checkAndConvert and to convert, because it only does conversion.

2010-07-23  Bernhard Herzog  <bh@intevation.de>

	* formed/meta/data.py (BoolLeaf.getValue): Return the value as int
	or None.  In MPuls/formed the values of BoolLeaf instances are
	always integers, except for plain bools where the value may be
	empty.

	* formed/meta/semantic.py (ChoiceChecker.checkAndConvert): Adapt
	to BoolLeaf.getValue returning ints.

	* formed/meta/semantic.py (RadioChecker.checkAndConvert): Adapt to
	BoolLeaf.getValue returning ints.

2010-07-22  Bernhard Herzog  <bh@intevation.de>

	* formed/instance/backends/common.py
	(AbstractInstanceTree.setData): Only copy old semantic errors from
	the uncommitted values if no new value was given.  Previously
	semantic errors were also copied for fields where a new but
	semantically invalid value was given.  This would eventually
	result in multiple semantic errors in the uncommitted fields,
	including errors for old values.  Also, an old invalid value would
	be shown in the web-interface if a user tried to correct an
	invalid value with a different invalid value.

2010-07-21  Torsten Irländer <torsten.irlaender@intevation.de>

	* formed/meta/data.py (NumericLeaf): New. Class for Numeric values
	  (floats)
	* formed/meta/io/document.py: Added NumericLeaf to document.
	* formed/instance/backends/postgres.py (buildChildren): Added
	  NumericLeaf.
	* formed/meta/data.py (float_or_none): New. function to convert
	  strings to float or None.
	* formed/meta/data.py (NumericLeaf.getMinValue),
	  formed/meta/data.py (NumericLeaf.getMinValue): Use float_or_none
	  function. 
	* formed/meta/semantic.py (NumericChecker): New. Added new checker for
	  Numeric values.

2010-07-19  Torsten Irländer <torsten.irlaender@intevation.de>

	* setup.py: Set versionnumber to 0.5.3

2010-07-16  Bernhard Herzog  <bh@intevation.de>

	* formed/meta/data.py (BoolLeaf.__repr__): include the value in
	the repr

2010-07-16  Bernhard Herzog  <bh@intevation.de>

	* formed/meta/data.py (PageNode.__repr__, GroupNode.__repr__)
	(RepeatNode.__repr__, MatrixNode.__repr__, RadioNode.__repr__)
	(BoolLeaf.__repr__, ExternalChoiceListLeaf.__repr__)
	(InfoLeaf.__repr__, TextAreaLeaf.__repr__, TextLeaf.__repr__)
	(ChoiceNode.__repr__, IntLeaf.__repr__, DateLeaf.__repr__): New.
	Added various __repr__ methods to make debug output more useful.

2010-07-16  Bernhard Herzog  <bh@intevation.de>

	* formed/meta/data.py (IntLeaf.getMaxValue, IntLeaf.getMinValue):
	Convert the return value to int using int_or_none.  This is an
	incompatible change.  Callers may need to be updated.

	* formed/meta/semantic.py (IntChecker.checkAndConvert): Adapt to
	getMinValue and getMaxValue returning int or None.  Also do not
	catch exceptions that result from converting the min and max value
	attributes as they are errors in the formed xml and not user
	errors.

2010-07-16  Bernhard Herzog  <bh@intevation.de>

	* formed/meta/data.py (TextLeaf.getMaxLength): Use int_or_none for
	the conversion to int instead of using equivalent inline code

2010-07-16  Bernhard Herzog  <bh@intevation.de>

	* formed/meta/data.py (int_or_none): New helper function to handle
	string conversion to integers that converts empty strings to None.

2010-07-16  Bernhard Herzog  <bh@intevation.de>

	* formed/meta/data.py (PageNode.setInvisible, GroupNode.setRepeat)
	(GroupNode.setInvisible, RepeatNode.setMin, RepeatNode.setMax)
	(RepeatNode.setDigest, ConditionalNode.setInvisible)
	(RadioNode.setSelected, BoolLeaf.setChecked)
	(InfoLeaf.setInvisible, TextAreaLeaf.setCols)
	(TextAreaLeaf.setRows, TextLeaf.setSize, TextLeaf.setMaxLength)
	(ChoiceNode.setSize, ChoiceNode.setMultiple)
	(ChoiceNode.setSelected, IntLeaf.setMinValue)
	(IntLeaf.setMaxValue): Removed.  They were not used anywhere.  Not
	even in very old waska/wasko code.

2010-07-16  Bernhard Herzog  <bh@intevation.de>

	* formed/meta/semantic.py (TextChecker.checkAndConvert): Apply the
	length limit after the conversion to unicode because that's what
	the limit actually applies to.

2010-07-16  Bernhard Herzog  <bh@intevation.de>

	* formed/meta/semantic.py (safe_unicode, ensure_unicode): Replace
	safe_unicode with ensure_unicode.  The former did nothing.  The
	latter converts to unicode in a smarter way than the inline code
	used in some places in the module.
	(TextChecker.checkAndConvert, TextAreaChecker.checkAndConvert):
	Use ensure_unicode to convert to unicode instead of using inline
	code.  Also, there shouldn't be a need to check for exceptions
	from the conversion anymore.  Any exceptions that still occur
	should be actual errors in the application using libformed.

2010-07-16  Bernhard Herzog  <bh@intevation.de>

	* formed/meta/semantic.py (TextChecker.checkAndConvert): Fail
	loudly if the getMaxLength method raises an error.  If that
	happens there's something wrong with the formed XML file that
	needs to be fixed.

2010-07-16  Bernhard Herzog  <bh@intevation.de>

	* formed/meta/semantic.py (Converter): Removed.  not used anywhere.
	(TextChecker.convert, TextAreaChecker.convert, IntChecker.convert)
	(DateChecker.convert): Removed. Not used anywhere.

2010-07-15  Bernhard Herzog  <bh@intevation.de>

	* formed/meta/data.py (TextLeaf.getMaxLength): Return the value as
	an int or None, not a string.  If the string is empty, return
	None.  The callers should not have to convert the values
	themselves.
	(TextLeaf.setMaxLength): Accept ints and None in analogy to
	getMaxLength

	* formed/meta/semantic.py (TextChecker.checkAndConvert): Adapt to
	getMaxLength now returning int.

2010-07-14  Torsten IrlÃ¤nder <torsten.irlaender@intevation.de>

	* formed/instance/backends/postgres.py (DBFactory.copy_instance_tree):
	Changed copy copyfunction to only copy given fields. If fields is None
	all fields will be copied.

2010-07-14  Bernhard Herzog  <bh@intevation.de>

	* formed/instance/backends/common.py
	(AbstractInstanceTree.rule_available): Use the rule's
	isAlwaysAvailable method to determine whether to look at the
	conditionals at all.  Update doc-string.

2010-07-14  Bernhard Herzog  <bh@intevation.de>

	* formed/meta/data.py (RuleLeaf.isAlwaysAvailable): New.  Returns
	whether the rule is always available, where always available means
	that the rule is to be evaluated even if it depends on
	conditionals that are false.  Error rules and only error rules are
	always available.

2010-07-01  Bernhard Herzog  <bh@intevation.de>

	* formed/meta/semantic.py (ChoiceChecker.checkAndConvert): The
	return value of ExternalChoiceListLeaf.getChildren cannot be None
	anymore, so there's no need to treat it
	separately. ExternalChoiceListLeaf can be handled in the same way
	as GroupNode now, so refactor the code accordingly.

2010-07-01  Bernhard Herzog  <bh@intevation.de>

	* formed/meta/data.py (ExternalChoiceListLeaf.getChildren): Raise
	an exception (RuntimeError) if the file with the external choices
	does not contain a choice element.

2010-07-01  Bernhard Herzog  <bh@intevation.de>

	* formed/meta/semantic.py (convertFromDescription): Removed. Not
	used anywhere.  Apparently this wasn't ever used by any of the
	MPuls applications.
	(_checkBool, ChoiceConverter, RadioConverter, BoolConverter)
	(CONVERTERS): Removed because they're only needed for the now
	removed convertFromDescription

2010-06-18  Bernhard Herzog  <bh@intevation.de>

	* formed/meta/document.py
	(Document.validate_conditional_dependencies): Rework this so that
	it only iterates over the conditionals once and only prints one
	warning when a conditional indirectly refers to itself.

2010-06-17  Bernhard Herzog  <bh@intevation.de>

	* formed/meta/document.py
	(Document.validate_conditional_dependencies): It's sometimes
	useful to have a conditional that depends on itself.  So only
	print a warning instead of raising an exception.

2010-06-15  Bernhard Herzog  <bh@intevation.de>

	Implement copying of instance trees.  The implementation is not
	ideal, as we should probably check the values that are inserted.

	* formed/instance/backends/common.py
	(AbstractInstanceTree.force_data): New method to set data without
	any conversion or checks to be used when e.g. copying data from
	one instance tree to another.

	* formed/instance/backends/postgres.py
	(DBFactory.copy_instance_tree): New method to create a new
	instance tree based on an existing one.

2010-06-15  Bernhard Herzog  <bh@intevation.de>

	* formed/instance/backends/postgres.py
	(DBRepeatInstanceContainerNode.createInstance): Set the parent of
	the new LazyRepeatInstanceNode so that identifiers are determined
	correctly

2010-06-15  Bernhard Herzog  <bh@intevation.de>

	* formed/instance/backends/postgres.py
	(DBRepeatInstanceContainerNode.createInstance): Pass None as the
	children parameter to LazyRepeatInstanceNode so that the new
	instance will actually load the children from the database in the
	getChildren method.

2010-06-15  Bernhard Herzog  <bh@intevation.de>

	* formed/instance/tree.py (InstanceLeaf.isLeaf): Added this
	missing method.

2010-05-06  Bernhard Herzog  <bh@intevation.de>

	* formed/instance/backends/common.py
	(AbstractInstanceTree.rule_available): Fix typo in doc-string.

2010-05-04  Torsten Irländer <torsten.irlaender@intevation.de>

	* formed/meta/data.py (ChoiceNode.getChildren): Overwrite this method
	to handle grouping in ChoiceNodes.
	* formed/meta/data.py (ChoiceNode.getSize): Reverted last change.

2010-04-23  Torsten Irländer <torsten.irlaender@intevation.de>

	* formed/meta/semantic.py (DateChecker): Wald #1434. Fixed converting
	dates. Converting userinput to date now works like described in
	- https://wasko-schulverweigerung.intevation.de/Tipps%26Tricks
	- http://support.intevation.de/wasko-schulverweigerung/issue247
	msg1396
	* setup.py: Set version number to 0.5.1

2010-04-21  Torsten Irländer <torsten.irlaender@intevation.de>

	* setup.py: Insertet version and author info in libformed.

2010-04-08  Bernhard Herzog  <bh@intevation.de>

	Make it possible to figure out exactly which items in the instance
	tree led to a rule violation.  This is particularly important for
	rules referring to fields in repeat groups because it was not
	possible to determine which instance of a repeat group was
	responsible for the rule violation so that too many fields were
	flagged as being incorrect or having warnings, including fields
	that were actually OK.

	* formed/meta/exprtree.py (EvalContext.get_var): Adapt to the new
	structure of the self.vars and self.for_all
	(EvalContext.get_all_vars): New. Return all variables used as a
	list of (id, value) pairs.
	(Expr.evaluate_instances, Expr.evaluate): Split evaluate in
	evaluate and evaluate_instances.  The evaluate method behaves as
	before, but is just a front-end for evaluate_instances.
	evaluate_instances returns a detailed result which the caller can
	use to determine which instance tree items make the rule fail.
	evaluate_instances has been adapted to the new return values of
	RuleEvalContext.getValueForVar and
	RuleEvalContext.getAllValuesForVar

	* formed/instance/backends/common.py (RuleEvalContext.getValueForVar)
	(RuleEvalContext.getAllValuesForVar): Do not return just the
	values, return tuples of the form (identifier, value) instead
	(getValueForVar returns such a tuple, getAllValuesForVar a list of
	them).  Now the caller can determine which instance tree items
	make a rule fail.
	(AbstractInstanceTree.evaluate.applicable): Use the new
	evaluate_instances method of expressions and only create an
	ErrorItem if the rule fails for the key currently being tested.
	This way, ErrorItems refer to only those field in repeat groups
	that actually make rules fail.

2010-04-01  Bernhard Herzog  <bh@intevation.de>

	* formed/meta/exprtree.py (Expr.compile): Fix typos in comment.

2010-03-23  Bernhard Herzog  <bh@intevation.de>

	* formed/meta/document.py (conditional_parents): The node
	component object nc is actually the last item in the return value
	of nc.pathToRoot(), not the first.

2010-03-22  Bernhard Herzog  <bh@intevation.de>

	* formed/meta/data.py: Remove unused imports

2010-03-22  Bernhard Herzog  <bh@intevation.de>

	Make sure the external choices can be loaded.

	* formed/meta/document.py
	(Document.validate_external_choice_leafs): New.  Make sure the
	files referenced by external choice nodes actually can be loaded.
	This is done by forcing them to be loaded using their getChildren
	method.
	(Document.validate_tree): Also call
	validate_external_choice_leafs.

2010-03-22  Bernhard Herzog  <bh@intevation.de>

	* formed/meta/data.py (ExternalChoiceListLeaf.getChildren): Do not
	silently suppress exceptions when trying to load the external
	choice data.  If the data cannot be loaded the program cannot be
	used so it should fail noisily.

2010-03-22  Bernhard Herzog  <bh@intevation.de>

	* formed/meta/document.py
	(Document.validate_conditional_dependencies): New. Perform some
	extra dependency validation for conditionals.  This includes
	detection of some simply cycles and conditionals depending on
	other conditionals.
	(Document.validate_tree): Also perform extra dependency validation
	for conditionals with validate_conditional_dependencies.

2010-03-22  Bernhard Herzog  <bh@intevation.de>

	* formed/meta/document.py (Document.validate_expr_dependencies):
	New. Contains the dependency check from validate_tree.
	(Document.validate_tree): Call validate_expr_dependencies for the
	actual check.

2010-03-22  Bernhard Herzog  <bh@intevation.de>

	* formed/meta/io/factories.py (SimpleCreator.createFactory):
	Handle missing optional methods more precisely.  Do not call the
	optional method inside the try-except block, because that would
	not only catch the AttributeError exception raised for a missing
	setLoadContext method but also suppress AttributeError exceptions
	raised during the execution of the method which would hide real
	errors.

2010-03-22  Bernhard Herzog  <bh@intevation.de>

	* formed/meta/nodecomponents.py (Node.getParsedContainers): New.
	Return parsed container value so that users of the class do not
	have to do the parsing themselves.

2010-03-18  Bernhard Herzog  <bh@intevation.de>

	* formed/meta/document.py (Document.buildIndices): Introduce new
	index: name2markingrules that maps widget names to the rules which
	refer to that widget in their mark attribute.
	(Document.buildIndices.callback): Insert rules into
	name2markingrules

2010-03-18  Bernhard Herzog  <bh@intevation.de>

	* formed/meta/data.py (RuleLeaf.getMarkedName): New.  Returns the
	name of the widget the mark attribute refers to.

2010-03-18  Bernhard Herzog  <bh@intevation.de>

	* formed/meta/data.py (RuleLeaf.isWarning): New. Checks whether
	rule violations are warnings or notices.  Added to avoid explicit
	parsing of the mark value by code using the rules.

2010-03-18  Bernhard Herzog  <bh@intevation.de>

	* formed/meta/document.py (Document.validate_tree): New. Method to
	perform some validation of the formed meta tree.  At this point it
	only checks whether all dependencies of expressions are actually
	defined in the tree.
	(Document.init): Call validate_tree after building the indices.

2010-03-18  Bernhard Herzog  <bh@intevation.de>

	* formed/instance/backends/common.py
	(AbstractInstanceTree.evaluate_conditional): New.  Evaluate the
	expression of a conditional.  This effectively moves code from the
	mpuls web client into libformed.

2010-03-17  Bernhard Herzog  <bh@intevation.de>

	* formed/meta/document.py (Document.buildIndices.callback): Print
	a warning when node component names are not unique.

2010-03-17  Bernhard Herzog  <bh@intevation.de>

	* test/pg_test.py: Adapt code formatting to MPuls conventions.

2010-03-12  Bernhard Herzog  <bh@intevation.de>

	* formed/meta/data.py (RuleLeaf.__repr__): New. Added to make the
	repr more useful by including the name, the expression and the
	mark attribute in the repr.

2010-03-12  Bernhard Herzog  <bh@intevation.de>

	* formed/instance/backends/common.py
	(AbstractInstanceTree.evaluate.applicable): Ignore rules that
	depend on inactive conditionals.  This is done using the new
	method rule_available.
	(AbstractInstanceTree.rule_available): New. Helper method to
	determine whether a rule is available by checking whether it
	refers to any field in an inactive conditional

2010-03-12  Bernhard Herzog  <bh@intevation.de>

	* formed/meta/data.py (ConditionalNode.__repr__): Include the
	conditional's name.

2010-03-12  Bernhard Herzog  <bh@intevation.de>

	* formed/meta/document.py (Document.buildIndices): Build a mapping
	from field names to the containing conditionals.  This in addition
	to the mappings already built by buildIndices.  This mapping can
	be used to determine whether an expression refers to fields that
	are only conditionally available and then to e.g. ignore rules
	that refer such fields when their conditions are false.
	(conditional_parents): New. Helper function for the above.

2010-03-12  Bernhard Herzog  <bh@intevation.de>

	* formed/instance/backends/postgres.py (buildChildren): Explicitly
	ignore RuleLeaf instances and warn when encountering other
	unexpected formed meta tree nodes.

2010-03-12  Bernhard Herzog  <bh@intevation.de>

	* formed/meta/exprtree.py (Expr.compile): Verify that the
	expression reduces to exactly one compiled expression object.
	Raise a ValueError if that is not the case.  This check can find
	errors in expressions where e.g. operators are spelled incorrectly
	or boolean operators (or/and) are missing.

2010-03-12  Bernhard Herzog  <bh@intevation.de>

	* formed/meta/exprtree.py (AGE, YEARS): Rename AGE to YEARS and
	have it take two dates as parameters.  This is more generic and
	with the today operator almost as easy to use to calculate the age
	of a person at the current date.
	(NODE_FACTORIES): rename 'age' to 'years' and use YEARS instead of
	AGE.

2010-03-11  Bernhard Herzog  <bh@intevation.de>

	* formed/instance/backends/common.py
	(AbstractInstanceTree.evaluate.applicable): Create the
	RuleEvalContext out of the loop checking all rules for a given
	field.  The RuleEvalContext is not changed in the loop at all.

2010-03-11  Bernhard Herzog  <bh@intevation.de>

	* formed/instance/backends/common.py
	(AbstractInstanceTree.evaluate.applicable): Move the error rules
	check to where the initial list of rules to apply is created.

2010-03-11  Bernhard Herzog  <bh@intevation.de>

	* formed/instance/backends/common.py
	(AbstractInstanceTree.evaluate.applicable): Use the rule's isError
	method to determine whether a rule is an error rule

2010-03-11  Bernhard Herzog  <bh@intevation.de>

	* formed/meta/exprtree.py (AGE): New.  Function to compute a
	date-difference in years suitable to determine a person's age.
	(NODE_FACTORIES): Add the AGE function as "age".

2010-03-11  Bernhard Herzog  <bh@intevation.de>

	* formed/meta/data.py (RuleLeaf.isError): New.  Checks whether
	rule violations are errors.  Added to avoid explicit parsing of
	the mark value by code using the rules.

2010-03-11  Bernhard Herzog  <bh@intevation.de>

	* formed/meta/data.py (ConditionalNode.__repr__): Added to make
	the repr more useful by including the expression and invisible
	flag in the repr.

2010-03-10  Bernhard Herzog  <bh@intevation.de>

	* formed/instance/tree.py (RepeatInstanceContainerNode.__init__)
	(PageInstanceNode.__init__): Remove constructors identical to the
	base-class versions

2010-03-10  Bernhard Herzog  <bh@intevation.de>

	* formed/meta/nodecomponents.py (CaseNode.__init__)
	(LogbookNode.__init__): Remove constructors identical to the
	base-class versions

2010-03-09  Bernhard Herzog  <bh@intevation.de>

	* formed/meta/data.py (ExternalChoiceListLeaf.find_default):
	Return the correct value if default is found.  Simplify the result
	value handling.

2010-03-09  Bernhard Herzog  <bh@intevation.de>

	* formed/meta/semantic.py (IntChecker.checkAndConvert): Use
	basestring when checking for string types.

2010-03-09  Bernhard Herzog  <bh@intevation.de>

	* formed/meta/data.py (LogbookNode.__init__, MatrixNode.__init__)
	(DateLeaf.__init__): Remove constructors identical to the
	base-class versions

2010-03-09  Bernhard Herzog  <bh@intevation.de>

	* formed/meta/document.py (Document.buildIndices): Initialize the
	visitor more directly

2010-03-09  Bernhard Herzog  <bh@intevation.de>

	* formed/meta/document.py: Some more formatting fixes

2010-03-05  Bernhard Herzog  <bh@intevation.de>

	* formed/meta/semantic.py (expand_two_digit_year): New method to
	expand two digit years.  Extracted from DateChecker.checkAndConvert.
	(DateChecker.checkAndConvert): Use expand_two_digit_year instead
	of repeated inline code for that purpose.

2010-03-05  Bernhard Herzog  <bh@intevation.de>

	* formed/instance/backends/common.py
	(RuleEvalContext.getValueForVar): Handle case where var.getValue()
	returns something false (e.g. 0).  In this case the "expr and
	var.getValue() or other" construct doesn't work as a substitute
	for an if-then-else expression as the programmer expected and
	returns other, not var.getValue().

2010-03-04  Bernhard Herzog  <bh@intevation.de>

	* formed/meta/document.py (Document.getNames): Fix a broken return
	statement.

2010-03-03  Bernhard Herzog  <bh@intevation.de>

	* formed/meta/data.py (ConditionalNode.setInvisible): Add missing
	parameter

2010-03-02  Bernhard Herzog  <bh@intevation.de>

	* formed/instance/backends/common.py
	(AbstractInstanceTree.setData): Remove debug print

2010-03-02  Bernhard Herzog  <bh@intevation.de>

	* formed/instance/backends/postgres.py: Remove unused imports

2010-03-02  Bernhard Herzog  <bh@intevation.de>

	* formed/instance/backends/postgres.py (DBInstanceTree.commit):
	Remove debug prints

2010-03-02  Bernhard Herzog  <bh@intevation.de>

	* formed/instance/backends/postgres.py (get_case_structure)
	(loadRepeatData, buildChildren)
	(DBRepeatInstanceContainerNode.deleteInstance)
	(LazyRepeatInstanceNode.loadData)
	(LazyRepeatInstanceNode.lazyLoad)
	(LazyRepeatInstanceNode.getChildren, LazyPageNode.lazyLoad)
	(InstanceTreeBuilder.recursive_build): Remove some commented out
	debug code

2010-03-02  Bernhard Herzog  <bh@intevation.de>

	* formed/instance/backends/postgres.py: Some more formatting
	fixes.

2010-03-02  Bernhard Herzog  <bh@intevation.de>

	Make AbstractInstanceTree.getAllItemsForName work.

	* formed/instance/backends/common.py
	(ArrayIterator.current_is_last): New method.  has_next returns
	True when current is actually the last item because the current
	item is the one that will be returned by the next call to next.
	So has_next cannot be used to determine whether the current item
	is actually the last in getAllItemsForName
	(AbstractInstanceTree.getAllItemsForName): Make this function work
	by using current_is_last instead of has_next.

2010-03-02  Bernhard Herzog  <bh@intevation.de>

	* formed/instance/backends/common.py
	(AbstractInstanceTree.setData): Fix variable reference.  values
	was misspelled as value

2010-03-02  Bernhard Herzog  <bh@intevation.de>

	* formed/instance/backends/common.py
	(AbstractInstanceTree.getItem): Remove some commented out debug
	code

2010-03-02  Bernhard Herzog  <bh@intevation.de>

	* formed/instance/backends/common.py (RuleEvalContext.__init__):
	Avoid mutable default values.  Use None as the default value of
	shadow and replace it with a dict later

2010-03-02  Bernhard Herzog  <bh@intevation.de>

	* formed/instance/backends/common.py,
	formed/instance/backends/database.py,
	formed/instance/backends/postgres.py,
	formed/instance/factories.py, formed/instance/tree.py,
	formed/meta/__init__.py, formed/meta/data.py,
	formed/meta/document.py, formed/meta/exprtree.py,
	formed/meta/io/annotations.py, formed/meta/io/document.py,
	formed/meta/io/factories.py, formed/meta/io/parser.py,
	formed/meta/nodecomponents.py, formed/meta/semantic.py,
	formed/util/uuids.py:
	Adapt code formatting to MPuls conventions.
	This is basically the same as Python's PEP 8.

2010-02-12  Bernhard Herzog  <bh@intevation.de>

	* formed/meta/document.py: Add missing import sys

2010-02-12  Bernhard Herzog  <bh@intevation.de>

	* formed/meta/data.py, formed/meta/exprtree.py,
	formed/meta/io/document.py, formed/meta/io/factories.py,
	formed/meta/io/parser.py, formed/meta/nodecomponents.py: Change
	coding declaration from latin1 to latin-1 to make it work with
	emacs

2009-11-19	Torsten Irländer 	<torsten.irlaender@intevation.de>

	* formed/instance/tree.py: Added function to simulate saving and
	converting data. Needs to implemented in concrete class

2009-11-19	Sascha L. Teichmann	<teichmann@intevation.de>

	* formed/util/*: package for misc utils.
	* formed/util/uuids.py: Generator for type 4 UUIDs. Trys to
	  use uuid module chipped with python 2.5. If not presents
	  it falls back to os.urandom() or random.randrange().
	  The generator enumerates each generated UUID to make it
	  easier to generate internal ids.

2009-11-18	Torsten Irländer 	<torsten.irlaender@intevation.de>

	* formed/meta/nodecomponents.py: Added getChildren method
	* formed/meta/semantic.py: Support grouping of choicelists

2009-11-17	Sascha L. Teichmann	<teichmann@intevation.de>

	* formed/instance/backends/common.py: Common base classes for 
	  backends.

	* formed/instance/backends/postgres.py: Uses common base classes
	  now.

2009-08-12	Sascha L. Teichmann	<teichmann@intevation.de>

	* formed/instance/backends/postgres.py: Merge old semantic errors
	  into new ones correctly.

2009-08-11	Sascha L. Teichmann	<teichmann@intevation.de>

	* formed/instance/backends/postgres.py: Fixed problems
	  reported by pychecker.

	* formed/instance/tree.py: Implemented generic
	  {has|get}Errors() for InstanceNodes.

2009-08-11	Sascha L. Teichmann	<teichmann@intevation.de>

	* formed/instance/backends/postgres.py: Fixed code path
	  if your only change request is an invalid field.

2009-08-10	Sascha L. Teichmann	<teichmann@intevation.de>

	* formed/instance/backends/stubtree.py: Removed. Not needed
	  any more.

	* formed/meta/semantic.py: refurbished ErrorItem. removed the 
	  intern name reference to page because we do not attach them
	  to pages any more.

	* formed/instance/backends/postgres.py: Fixed various issues
	  concerning error handling. Its working much better now!

2009-08-03	Sascha L. Teichmann	<teichmann@intevation.de>

	* formed/meta/data.py: added a method to handle rgs
	  in WidgetCollector by overwriting.

	* formed/instance/factories.py: added parameter to handle
	  external data like logbook and documents.

	* formed/instance/backends/postgres.py: export cases as XML.

2009-08-03	Sascha L. Teichmann	<teichmann@intevation.de>

	Initial support for XML export.

	* formed/instance/factories.py: Added method toXML to factory.
	* formed/instance/backends/postgres.py: Stub Implementation.
	* test/pg_xml.py: Test for postgres backend XML export.

2009-07-28	Sascha L. Teichmann	<teichmann@intevation.de>

	* formed/instance/tree.py: Added getTree() to InstanceComponent
	  to be able to fetch the instance tree that belongs to a
	  given component.

	* formed/instance/backends/postgres.py: Fixed serval bugs.

	Add rule evaluation in PostgreSQL setData. HIGHLY EXPERIMENTAL!!!

	* formed/instance/tree.py: add second parameter name
	  to getItem(). If given a field namend 'name' 
	  on the path to the idenitier searched. This was
	  add to find neighoring fields in reapeat groups
	  for rule evaluation.

	* formed/instance/backends/postgres.py: Added rule
	  evaluation.

	* formed/meta/document.py: New. Document was removed
	  from meta/nodecomponents to do indexing stuff which
	  needs knowledge of derivated class which are not
	  in meta/nodecomponents.

	* formed/meta/nodecomponents.py: Removed Document, removed
	  acient left overs.

	* formed/meta/io/factories.py, formed/meta/io/document.py:
	  Adjusted to use meta.document.

2009-07-27	Sascha L. Teichmann	<teichmann@intevation.de>

	* formed/meta/data.py: Removed relative import.

2009-07-27	Sascha L. Teichmann	<teichmann@intevation.de>

	* formed/instance/backends/postgres.py: Implemented
	  getAllItemsForName().

	* formed/meta/data.py, formed/meta/nodecomponents.py:
	  Removed event routing remains from FormEd editor.

2009-07-23	Sascha L. Teichmann	<teichmann@intevation.de>

	* formed/instance/backends/postgres.py: Fixed missing
	  key error in saveData().

2009-07-23	Sascha L. Teichmann	<teichmann@intevation.de>

	* formed/meta/nodecomponents.py: forget to c&p code
	  from WASKA/WASKO annotations code. :-/

2009-07-22	Sascha L. Teichmann	<teichmann@intevation.de>

	Decorate the meta tree with annotations.

	* formed/instance/tree.py: removed annotation stuff here.

	* formed/meta/io/document.py: Load annotations if there
	  are some next to the formed tree namend 'annotations.xhtml'

	* formed/meta/io/annotations.py: New. The loader of annotations.
	  Parses the WASKA/WASKO annotation files.

	* formed/meta/data.py: add default callback parameter in RelevantVisitor.

	* formed/meta/nodecomponents.py (findByName): Uses name2nc hash index if 
	  it is present.

2009-07-20	Sascha L. Teichmann	<teichmann@intevation.de>

	Added code to delete old repeat groups in postgres backend.

	* formed/instance/backends/postgres.py: Fixed 
	  InstanceTree.getItem() (again).
	  New code to delete repeat group.

2009-07-20	Sascha L. Teichmann	<teichmann@intevation.de>

	Added code to create new repeat groups in postgres backend.

	* formed/instance/tree.py:
	  with UUIDs too

	* formed/instance/factories.py: Adjusted to create instance 
	  trees with UUIDs, too.

	* formed/instance/tree.py: Adjusted coding style.

	* formed/instance/backends/postgres.py:
	  DBRepeatInstanceContainerNode.createInstance() filled.
	  DBFactory.createNewInstanceTree() adjusted to respect
	  new UUID policy.

2009-07-17	Sascha L. Teichmann	<teichmann@intevation.de>

	* formed/instance/backends/postgres.py: If looking for
	  a repeat group container in getItem() it should be
	  found now.

2009-07-16	Sascha L. Teichmann	<teichmann@intevation.de>

	* formed/instance/backends/postgres.py: Removed loop
	  over children of a repeat group if building an instance.
	  This lead to loss of one level in the final instance tree
	  which made it un-navigatable. XXX: Not clear why it was 
	  this silly way! Have to look at side effects in the
	  future.

2009-07-14	Sascha L. Teichmann	<teichmann@intevation.de>

	* formed/instance/backends/postgres.py: Fixed problem
	  with repeat group containers.

2009-07-14	Sascha L. Teichmann	<teichmann@intevation.de>

	* formed/instance/backends/postgres.py: Fixed key problem
	  in building commit update.

2009-07-14	Sascha L. Teichmann	<teichmann@intevation.de>

	Added code to store data in a PostgreSQL backend. TODO:
	Re-enable rule checking again.

	* formed/instance/backends/postgres.py, formed/instance/tree.py:
	  Add code to store data in backend. Only semantic checking
	  is done by now. The rule checking code is buggy. :-/

	* formed/meta/semantic.py: Fixed long standing bug: s/Sematic/Semantic/g
	  
2009-07-09	Sascha L. Teichmann	<teichmann@intevation.de>

	* formed/meta/exprtree.py: Added a new class of variables:
	  'For all' variables, denoted with a prefixed '%' instead
	  of '$'. The 'for all' variables are quantifier variables,
	  which means the hole cross product of all possibilities
	  of variable sets have to fullfill the expr to fullfill 
	  the expr in toto. The use case is to check rules across
	  repeat groups. E.g to ensure that all beginnings of 
	  an 'Unterstuetzungs' are before end of case management.

2009-07-09	Sascha L. Teichmann	<teichmann@intevation.de>

	* formed/instance/backends/postgres.py,
	  formed/instance/tree.py, test/pg_test.py:
	  Replaced '$' with ':' as identifier separator.

2009-07-03	Sascha L. Teichmann	<teichmann@intevation.de>

	* formed/instance/backends/postgres.py (DBInstanceTree.getItem):
	  Return instance object instead of meta data.

	* formed/instance/tree.py: Removed needless imports.

	* test/pg_test.py (traverse): Adjust to pretty print the instance tree.

2009-07-02	Sascha L. Teichmann	<teichmann@intevation.de>

	* formed/instance/backends/postgres.py: implemented InstanceTree.getItem().

	* formed/meta/data.py: New visitor to find the 'relevant' node components.

	* formed/meta/io/document.py: Build a hash name -> 'relevant' node components.

	* formed/meta/nodecomponents.py: Added function to build this hash.

2009-07-02	Torsten Irländer 	<torsten.irlaender@intevation.de>

	* formed/instance/backends/postgres.py,
	* formed/instance/tree.py: Fixed getIdentifier(), and added some
	  addional classes for Database-Repeatgrouphandling. 

	* setup.py: Added setupscript.
	
2009-07-02	Sascha L. Teichmann	<teichmann@intevation.de>

	* formed/meta/data.py: Another hack against good ol' WidgetCollector.

	* formed/instance/backends/postgres.py: Build node structures
	  for embedded rgs. cleaned up a bit.

	* test/pg_test.py: Removed None checks for children.

2009-07-01	Sascha L. Teichmann	<teichmann@intevation.de>

	* formed/meta/data.py: Fixed more long standing errors.

	* formed/instance/tree.py: Moved getValue() & Co. to InstanceLeaf because
	  nodes do not have values.

	* formed/instance/backends/postgres.py: Generate InstanceLeafs for loaded
	  pages. TODO: Build (lazy) RepeatNodes for embedded repeat nodes.

2009-07-01	Sascha L. Teichmann	<teichmann@intevation.de>

	* formed/instance/backends/postgres.py: Build initial lazy pages, loaded
	  on access of children.

	* formed/meta/data.py: Fixed WidgetCollector to adhere the new repeat 
	  group concept.

	* formed/instance/tree.py: Fixed glitches in inheritance of nodes.

2009-07-01	Sascha L. Teichmann	<teichmann@intevation.de>

	* formed/meta/nodecomponents.py (RootNode.getCaseNode): New method
	  to access the real root node of the tree.

	* formed/instance/backends/postgres.py: Build InstanceNodes for each
	  top level node before pages.

2009-07-01	Sascha L. Teichmann	<teichmann@intevation.de>

	Adjusted PostgreSQL test

	* test/pg_test.py: Rewrite for new API

	* README: Documented test call
	* formed/instance/backends/database.py: Fix miss-spelled API call.

	* formed/instance/backends/postgres.py(DBFactory.loadInstanceTreeByIdentifier): 
	  Make uncommited arg optional as in base class.

	* formed/meta/nodecomponents.py: Fix recursion in setSelected.

2009-07-01	Sascha L. Teichmann	<teichmann@intevation.de>

	Removed syntax and import errors.

	* formed/instance/backends/postgres.py, formed/instance/backends/stubtree.py,
	  formed/instance/factories.py, formed/instance/tree.py, formed/meta/data.py,
	  formed/meta/exprtree.py, formed/meta/io/document.py,formed/meta/io/factories.py,
	  formed/meta/semantic.py: Replaced relative imports by absolute ones.

	* formed/instance/main.py: Removed
	* test/pg_test.py: Re-inserted here because it is a test for the 
	  PostgreSQL backend only.

2009-06-30	Sascha L. Teichmann	<teichmann@intevation.de>

	!!! INTERIM COMMIT !!! breaks everything. Not even syntactical
	correctl. Only commited to have a first sync. Relative imports
	are still broken. TODO: Back to absolute imports!

	* formed/instance/tree.py: Removed SectionNode. 
	  Introduced RepeatInstanceContainerNode.

	* formed/instance/backends/postgres.py: Adjusted code.
	
2009-06-30	Sascha L. Teichmann	<teichmann@intevation.de>

	!!! INTERIM COMMIT !!! breaks everything. Not even syntactical
	correctl. Only commited to have a first sync.

	* formed/instance/backends/database.py: New. Abstraction for
	  database access.

	* formed/instance/tree.py: Methods from stub implementation
	  in abstract base class

	* formed/instance/factories.py: New factory model.

	* formed/instance/backends/stubtree.py: Adjusted to new factory model.

	* formed/instance/backends/postgres.py: Adjusted to new factory model.
	  HEAVILY BROKEN!!!

2009-06-22	Torsten Irländer 	<torsten.irlaender@intevation.de>

	* formed/instance/backends/stubtree.py,
	  formed/instance/factories.py: Added dbinterface parameter to the
	  Tree Factory controller.

2009-06-19	Torsten Irländer 	<torsten.irlaender@intevation.de>

	Build stubtree as basis for renderer in mpuls

	* formed/instance/backends/stubtree.py,
	  formed/instance/factories.py: Build stubtree

2009-05-06	Sascha L. Teichmann	<teichmann@intevation.de>

	* formed/instance/tree.py: Add SectionNode to enable
	  structure build above pages.

	* formed/instance/factories.py: Removed datebase factory.
	  a concrete implementation is now found in backends/postgres.py

	* formed/instance/main.py: Adjusted to use new postgres backend

	* formed/instance/backends/postgres.py: New. PostgreSQL backend.
	  not working yet!

2009-04-20	Sascha L. Teichmann	<teichmann@intevation.de>

	* formed/instance/factories.py: Dummy factories for
	  DB and XML backends.

	* formed/instance/main.py: Create InstanceTree with DB 
	  dummy factory.

	* formed/instance/tree.py: A few new node type. Still
	  not ready.

2009-04-20	Sascha L. Teichmann	<teichmann@intevation.de>

	* README: Add passus how to launch demo app

	* formed/meta/data.py: Added repeat node

	* formed/meta/io/document.py: enable to load repeat nodes.

	* formed/meta/io/parser.py: replaced acient DefaultHandler with
	  new ContentHandler.

	* formed/instance/factories.py: New. Factories for backends
	  XML and DB.

	* formed/instance/main.py: New. simple demo app to load meta
	  data and create instance tree.

	* formed/instance/tree.py: New. Classes for instance tree.

2009-04-20	Sascha L. Teichmann	<teichmann@intevation.de>

	* formed/*.py: use relative imports. This introduces the
	  mandatory usage of Python 2.5.

2009-04-16	Sascha L. Teichmann	<teichmann@intevation.de>

	* formed/**: created package structure.

2009-04-16	Sascha L. Teichmann	<teichmann@intevation.de>

	* testdata/repeat.xml: Sample FormEd XML file with repeat groups.

2009-04-16	Sascha L. Teichmann	<teichmann@intevation.de>

	* Changes, Changelog, README, TODO: Initial import
